/* ═══════════════════════════════════════════════════════════════
   GMAIL COMPOSER — Premium Send Email UI
   Manus.ai / Linear inspired glassmorphism drawer
   ═══════════════════════════════════════════════════════════════ */

/* ─── Overlay ──────────────────────────────────────────────── */
.gc-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.gc-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ─── Composer Card ────────────────────────────────────────── */
.gc-card {
    width: 560px;
    max-width: 94vw;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(60px) saturate(1.6);
    -webkit-backdrop-filter: blur(60px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-overlay.open .gc-card {
    transform: translateY(0) scale(1);
}

/* ─── Header ───────────────────────────────────────────────── */
.gc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: gcFadeRight 0.4s ease 0.1s both;
}

@keyframes gcFadeRight {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gc-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(99, 102, 241, 0.10));
    border: 1px solid rgba(59, 130, 246, 0.20);
    border-radius: 12px;
}

.gc-header-icon svg {
    width: 18px;
    height: 18px;
    color: #60a5fa;
}

.gc-header-title {
    font-size: 1.05rem;
    font-weight: 650;
    color: #f0f0f3;
    letter-spacing: -0.2px;
}

.gc-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(161, 161, 170, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gc-close svg {
    width: 14px;
    height: 14px;
}

.gc-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
    transform: rotate(90deg);
}

/* ─── Body ─────────────────────────────────────────────────── */
.gc-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none;
}

.gc-body::-webkit-scrollbar {
    display: none;
}

/* ─── Input Fields ─────────────────────────────────────────── */
.gc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: gcFieldFade 0.35s ease both;
}

.gc-field:nth-child(1) {
    animation-delay: 0.08s;
}

.gc-field:nth-child(2) {
    animation-delay: 0.14s;
}

.gc-field:nth-child(3) {
    animation-delay: 0.20s;
}

.gc-field:nth-child(4) {
    animation-delay: 0.26s;
}

@keyframes gcFieldFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gc-label {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.8px;
    color: rgba(161, 161, 170, 0.5);
    text-transform: uppercase;
}

.gc-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e4e4e7;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.84rem;
    outline: none;
    transition: all 0.25s ease;
}

.gc-input::placeholder {
    color: rgba(161, 161, 170, 0.35);
}

.gc-input:focus {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.08), 0 0 20px rgba(129, 140, 248, 0.06);
}

/* ─── Textarea ─────────────────────────────────────────────── */
.gc-textarea {
    width: 100%;
    min-height: 140px;
    max-height: 300px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e4e4e7;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.84rem;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: all 0.25s ease;
    scrollbar-width: none;
}

.gc-textarea::-webkit-scrollbar {
    display: none;
}

.gc-textarea::placeholder {
    color: rgba(161, 161, 170, 0.35);
}

.gc-textarea:focus {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.08), 0 0 20px rgba(129, 140, 248, 0.06);
}

/* ─── Attachment Zone ──────────────────────────────────────── */
.gc-attach-zone {
    padding: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: gcFieldFade 0.35s ease 0.32s both;
}

.gc-attach-zone:hover {
    border-color: rgba(129, 140, 248, 0.25);
    background: rgba(129, 140, 248, 0.04);
}

.gc-attach-zone.gc-dragover {
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(129, 140, 248, 0.08);
    transform: scale(1.01);
}

.gc-attach-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.gc-attach-icon svg {
    width: 16px;
    height: 16px;
    color: rgba(161, 161, 170, 0.4);
}

.gc-attach-text {
    font-size: 0.75rem;
    color: rgba(161, 161, 170, 0.5);
}

.gc-attach-text strong {
    color: #818cf8;
    font-weight: 600;
}

.gc-attach-hint {
    font-size: 0.65rem;
    color: rgba(161, 161, 170, 0.3);
}

/* ─── File Chips ───────────────────────────────────────────── */
.gc-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.gc-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.72rem;
    color: rgba(161, 161, 170, 0.8);
    animation: gcChipIn 0.25s ease both;
}

@keyframes gcChipIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gc-file-icon {
    width: 14px;
    height: 14px;
    color: #818cf8;
}

.gc-file-size {
    font-size: 0.62rem;
    color: rgba(161, 161, 170, 0.4);
}

.gc-file-remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.10);
    border: none;
    border-radius: 4px;
    color: #f87171;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.15s ease;
    padding: 0;
}

.gc-file-remove:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ─── Footer ───────────────────────────────────────────────── */
.gc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gc-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gc-footer-hint {
    font-size: 0.68rem;
    color: rgba(161, 161, 170, 0.35);
}

.gc-footer-hint kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.62rem;
    color: rgba(161, 161, 170, 0.5);
}

/* ─── Send Button — Premium CTA ────────────────────────────── */
.gc-send-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.gc-send-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.gc-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(59, 130, 246, 0.4);
}

.gc-send-btn:hover::after {
    opacity: 1;
}

.gc-send-btn:active {
    transform: translateY(0);
}

.gc-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gc-send-btn svg {
    width: 16px;
    height: 16px;
}

/* ─── Send Spinner ─────────────────────────────────────────── */
.gc-spin {
    animation: gcSpin 0.8s linear infinite;
}

@keyframes gcSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ─── Toast Notifications ──────────────────────────────────── */
.gc-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 550;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.30);
    animation: gcToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    backdrop-filter: blur(20px);
    max-width: 360px;
}

.gc-toast-success {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.gc-toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.gc-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@keyframes gcToastIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes gcToastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 580px) {
    .gc-card {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }

    .gc-header {
        padding: 16px 18px 12px;
    }

    .gc-body {
        padding: 16px 18px;
        gap: 14px;
    }

    .gc-footer {
        padding: 12px 18px 16px;
    }

    .gc-send-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
}