/* ============================
   Melbourne Timber Supplies — AI Float Panel CSS
   ============================ */

  #mts-gpt-fab-wrapper {
    position: fixed;
    bottom: 24px;
    right: 28px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    pointer-events: none;
  }

  #mts-gpt-fab-trigger,
  #mts-gpt-panel.mts-panel-visible {
    pointer-events: auto;
  }

  #mts-gpt-fab-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 0 14px;
    height: 50px;
    background: linear-gradient(135deg, #a97535 0%, #c79453 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(199, 148, 83, 0.5), 0 0 0 1px rgba(255,255,255,0.12);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    outline: none;
  }

  #mts-gpt-fab-label {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  #mts-gpt-fab-trigger.mts-active {
    background: linear-gradient(135deg, #c79453 0%, #d9a96a 100%);
    box-shadow: 0 6px 24px rgba(199,148,83,0.55), 0 0 0 2px rgba(199,148,83,0.4);
  }

  #mts-gpt-panel {
    width: 318px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.16), 0 4px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
    transform: translateY(12px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
    transform-origin: bottom right;
  }

  #mts-gpt-panel.mts-panel-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
  }

  .mts-gpt-panel-header {
    background: linear-gradient(135deg, #7a5628 0%, #a97535 55%, #c79453 100%);
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
  }

  .mts-gpt-panel-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px);
    pointer-events: none;
  }

  .mts-gpt-header-brand { display: flex; align-items: center; gap: 8px; color: #fff; position: relative; }
  .mts-gpt-brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: #fff; line-height: 1.2; }
  .mts-gpt-panel-subtitle { font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; position: relative; }
  .mts-gpt-current-url { color: rgba(255,255,255,0.38); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 286px; display: block; font-family: 'Courier New', monospace; position: relative; }

  .mts-gpt-actions { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 6px; }

  .mts-gpt-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #4a2f0e;
    background: #fdf8f2;
    border: 1px solid #e8d5bb;
    transition: all 0.18s ease;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
  }

  .mts-gpt-action-btn:hover {
    background: #f7ede0;
    border-color: #c79453;
    transform: translateX(-2px);
    box-shadow: 3px 0 0 0 #c79453 inset;
    text-decoration: none !important;
    color: #7a5628;
  }

  .mts-gpt-btn-primary { background: linear-gradient(135deg, #fef3e4 0%, #faebd4 100%); border-color: #ddb87c; }
  .mts-gpt-btn-primary:hover { background: linear-gradient(135deg, #fce8cc 0%, #f7dbb8 100%); border-color: #c79453; }

  .mts-gpt-btn-gemini { background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%); border-color: #c5d5f8; }
  .mts-gpt-btn-gemini:hover { background: linear-gradient(135deg, #e3ecff 0%, #dce8ff 100%); border-color: #4285F4; box-shadow: 3px 0 0 0 #4285F4 inset; color: #1a3a6e; }
  .mts-gpt-btn-gemini .mts-gpt-btn-text strong { color: #1a3a6e; }
  .mts-gpt-btn-gemini .mts-gpt-btn-text small { color: #4a6fa5; }
  .mts-gpt-btn-gemini .mts-gpt-btn-arrow { color: #4285F4; }

  .mts-gpt-btn-icon { width: 32px; height: 32px; border-radius: 8px; background: #ffffff; border: 1px solid #e0c89a; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #c79453; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
  .mts-icon-gemini { border-color: #c5d5f8; }

  .mts-gpt-btn-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 4px; flex-shrink: 0; text-transform: uppercase; }
  .mts-badge-gpt { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
  .mts-badge-gemini { background: #e8eeff; color: #1a5cb5; border: 1px solid #c5d5f8; }

  .mts-gpt-btn-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
  .mts-gpt-btn-text strong { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #4a2f0e; }
  .mts-gpt-btn-text small { font-size: 10.5px; color: #a07040; line-height: 1.3; }

  .mts-gpt-btn-arrow { font-size: 13px; color: #c79453; opacity: 0; transform: translateX(-4px); transition: all 0.18s ease; }
  .mts-gpt-action-btn:hover .mts-gpt-btn-arrow { opacity: 1; transform: translateX(0); }

  .mts-gpt-contact-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; background: #fdf3e6; border-top: 1px solid #e8d0aa; border-bottom: 1px solid #e8d0aa; margin: 4px 0 0; }
  .mts-gpt-contact-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #a97535; text-decoration: none; transition: color 0.15s; }
  .mts-gpt-contact-link:hover { color: #7a5628; text-decoration: underline; }
  .mts-gpt-contact-divider { color: #d9b88a; font-size: 11px; }

  .mts-gpt-panel-footer { padding: 8px 16px 12px; display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: #c0a070; margin-top: 2px; }
  .mts-gpt-copy-url { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid #ddc090; border-radius: 5px; padding: 3px 8px; font-size: 10.5px; color: #a07040; cursor: pointer; transition: all 0.15s; }
  .mts-gpt-copy-url:hover { background: #faebd4; border-color: #c79453; color: #7a5628; }

  @keyframes mts-gpt-pulse {
    0%   { box-shadow: 0 4px 20px rgba(199,148,83,0.5), 0 0 0 0 rgba(199,148,83,0.45); }
    70%  { box-shadow: 0 4px 20px rgba(199,148,83,0.5), 0 0 0 10px rgba(199,148,83,0); }
    100% { box-shadow: 0 4px 20px rgba(199,148,83,0.5), 0 0 0 0 rgba(199,148,83,0); }
  }
  #mts-gpt-fab-trigger:not(.mts-active) { animation: mts-gpt-pulse 2.8s ease-out infinite; }

  /* Gemini Modal */
  #mts-gemini-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    animation: mts-modal-fadein 0.18s ease;
  }

  @keyframes mts-modal-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  #mts-gemini-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.07);
    overflow: hidden;
    animation: mts-modal-slidein 0.22s cubic-bezier(0.34,1.4,0.64,1);
  }

  @keyframes mts-modal-slidein {
    from { transform: translateY(16px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
  }

  #mts-gemini-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eef2ff;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  }

  #mts-gemini-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a3a6e;
    font-family: 'Segoe UI', system-ui, sans-serif;
  }

  #mts-gemini-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #7090c0;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
  }
  #mts-gemini-modal-close:hover { background: #dde8ff; color: #1a3a6e; }

  #mts-gemini-modal-instruction {
    font-size: 12px;
    color: #4a6fa5;
    margin: 12px 16px 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
  }
  #mts-gemini-modal-instruction kbd {
    background: #eef2ff;
    border: 1px solid #c5d5f8;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: monospace;
    color: #1a3a6e;
  }

  #mts-gemini-prompt-box {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px;
    height: 130px;
    padding: 10px 12px;
    font-size: 11.5px;
    font-family: 'Courier New', monospace;
    color: #2d3748;
    background: #f8faff;
    border: 1px solid #c5d5f8;
    border-radius: 8px;
    resize: none;
    line-height: 1.5;
    box-sizing: border-box;
    outline: none;
  }
  #mts-gemini-prompt-box:focus { border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.12); }

  #mts-gemini-modal-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
  }

  #mts-gemini-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #fff;
    border: 1.5px solid #4285F4;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #4285F4;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Segoe UI', system-ui, sans-serif;
    flex: 1;
    justify-content: center;
  }
  #mts-gemini-copy-btn:hover { background: #e8f0fe; color: #1a5cb5; border-color: #1a5cb5; }

  #mts-gemini-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    background: linear-gradient(135deg, #4285F4 0%, #5a95ff 100%);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.15s;
    flex: 1;
    font-family: 'Segoe UI', system-ui, sans-serif;
  }
  #mts-gemini-open-btn:hover { background: linear-gradient(135deg, #2a6de8 0%, #4a80f0 100%); text-decoration: none; color: #fff; box-shadow: 0 4px 12px rgba(66,133,244,0.35); }

  @media (max-width: 480px) {
    #mts-gpt-fab-wrapper { bottom: 18px; right: 16px; }
    #mts-gpt-fab-trigger { height: 42px; padding: 0 14px 0 10px; gap: 6px; }
    #mts-gpt-fab-label { font-size: 12px; }
    #mts-gpt-fab-trigger svg { width: 20px; height: 20px; }
    #mts-gpt-panel { width: calc(100vw - 32px); max-width: 318px; }
    #mts-gemini-modal-actions { flex-direction: column; }
  }
