/* Neon green glow + rotating spinner + shimmer for loading state
   Spinner uses ::after pseudo-element
   Shimmer uses ::before pseudo-element
   Glow animation uses neonPulse keyframes */

#distillerytrack-ai .button {
    position: relative;
    overflow: hidden;
    transition: box-shadow 200ms ease, transform 160ms ease, background-color 160ms ease;
}

/* Loading state visual treatment */
#distillerytrack-ai .button.loading-btn {
    /* Lowered green intensity */
    background-color: #3cb371 !important; /* mediumseagreen - softer green */
    color: #001 !important;
    /* Removed pulsing glow - keep layout spacing for spinner */
    padding-left: 44px; /* leave space for spinner */
}

/* Removed pulsing animation and shimmer: no animation should run on .loading-btn */

/* Rotating spinner inside the button using ::after (does not push layout)
   Spinner is positioned absolutely so it overlays without changing flow */
#distillerytrack-ai .button.loading-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.95);
    border-right-color: transparent;
    border-top-color: #fff;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    box-sizing: border-box;
    animation: spin 1s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* Removed shimmer effect: shimmer was removed to keep loading state subtle */
#distillerytrack-ai .button.loading-btn::before {
    display: none;
}

/* Keyframes */
/* Removed pulsing animation (neonPulse) to make loading state non-animated */
@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
}

/* Bold the main user input text */
#distillerytrack-ai textarea#dt-prompt {
    /* Made input text bold for clarity */
    font-weight: bold;
}
/* Removed shimmer keyframes (no shimmer effect) */

/* Unified font size + layout for both buttons */
.dt-btn {
    /* Unified font size + layout for both buttons */
    font-family: inherit;        /* match Generate Trail font */
    font-weight: 600;            /* match Generate Trail */
    font-size: 16px;            /* unified font size */
    letter-spacing: 0.3px;       /* match Generate Trail */
    text-transform: none;        /* ensure consistency */

    height: 48px;
    padding: 0 22px;
    line-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s ease, opacity 0.25s ease, transform 0.2s ease;
}

/* Both buttons now share dt-btn for identical styling */
.dt-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(46,204,113,0.12);
}

/* Both buttons now share equal width via flex:1 */
.button-row {
    display: flex;
    justify-content: center;
    gap: 10px;              /* spacing between buttons */
}

.button-row .dt-btn {
    flex: 1;                /* both buttons take equal width */
    min-width: 120px;       /* prevents collapsing on mobile */
    text-align: center;     /* keeps text centered */
}

/* Removed legacy width/font rules to avoid mismatches */
.generate-btn,
.open-route-btn {
    font-weight: inherit;
    text-transform: none;
    letter-spacing: inherit;
    font-size: inherit;
} 

/* Removed legacy button sizing to avoid conflicts */

/* Added summary-box container styling for readability */
.summary-box {
    /* Brightened summary-box for readability */
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(4px);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Fixed vertical centering of Maps button */
.open-route-btn span,
.open-route-btn i {
    display: inline-flex;
    align-items: center;
} 

/* Styled Google Maps route button (color/state only) */
.open-route-btn {
    border: none;
    background: #2c3e50;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.4s ease, box-shadow 160ms ease, transform 160ms ease;
    /* Added: start hidden and non-interactive until activated */
    opacity: 0;
    pointer-events: none;
}
.open-route-btn.ready {
    /* Added: visible and interactive when ready */
    opacity: 1;
    pointer-events: auto;
}
.fade-in {
    /* Added fade-in animation for Maps button */
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}
.open-route-btn:hover:not([disabled]) {
    /* Added green hover state for Maps button */
    background: #2ecc71;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(46,204,113,0.18);
}
.open-route-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46,204,113,0.12);
}

/* Fixed vertical centering of Maps button */
.open-route-btn span,
.open-route-btn i {
    display: inline-flex;
    align-items: center;
} 

/* Added .button-row layout */
/* Ensures perfect horizontal alignment */
.button-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* ensures mobile friendliness */
}

/* Optional divider (if needed) */
.button-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.2);
}
