/* public/css/settings.css */

/* --- The Grid Architecture --- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Vellum Card Aesthetic --- */
.d2c-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.d2c-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.d2c-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

/* --- Input Groups --- */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.d2c-input {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #334155;
    transition: all 0.2s ease;
    outline: none;
}

.d2c-input:focus {
    background: #ffffff;
    border-color: #007CBF;
    /* SpecLogic Blue */
    box-shadow: 0 0 0 3px rgba(0, 124, 191, 0.1);
}

/* --- Validation Buttons --- */
.btn-validate {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-validate:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Success State (Triggered by JS) */
.btn-validate.success-state {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #166534 !important;
}

/* --- Application Viewport Utility (CRITICAL FOR ROUTING) --- */
.d2c-hidden {
    display: none !important;
}

/* --- Top Navigation Shell --- */
.spec-nav {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 32px;
}

.nav-tab {
    padding: 16px 24px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: #0f172a;
}

.nav-tab.active {
    color: #007CBF;
    /* SpecLogic Blue */
    border-bottom-color: #007CBF;
}

/* Smooth transition when swapping views */
.view-container {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Settings Header & Layout --- */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.settings-header p {
    font-size: 0.875rem;
    color: #64748b;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Forces exactly 2 columns */
    gap: 24px;
}

/* --- Card Headers & Icons --- */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title-group h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1rem;
    color: #1e293b;
    text-transform: none;
    letter-spacing: normal;
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Icon Color Themes */
.icon-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.icon-purple {
    background: #faf5ff;
    color: #a855f7;
}

.icon-green {
    background: #f0fdf4;
    color: #22c55e;
}

.icon-orange {
    background: #fff7ed;
    color: #f97316;
}

/* Add this right below .icon-orange in your settings.css */
.icon-teal {
    background: #f0fdfa;
    color: #0d9488;
}

/* Add this utility to allow our 5th card to span the full width of the bottom row */
.span-full {
    grid-column: 1 / -1;
}

/* --- Action Pills --- */
.action-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-link {
    color: #3b82f6;
    background: transparent;
}

.action-link:hover {
    text-decoration: underline;
}

.action-pill-purple {
    color: #9333ea;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
}

.action-pill-purple:hover {
    background: #e9d5ff;
}

/* --- Segmented Toggle Rows --- */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.toggle-row.active {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.toggle-info h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.toggle-info p {
    font-size: 0.75rem;
    color: #64748b;
}

/* Custom Large Checkbox */
.d2c-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

/* --- Fix for Header Action Buttons --- */
.card-header-flex .btn-validate {
    width: auto !important;
    margin-top: 0 !important;
}

.action-link.btn-validate {
    border: none !important;
    background: transparent !important;
    padding-right: 0;
    /* Aligns the text perfectly flush right */
}

/* Ensure the hover state doesn't bring back the grey background */
.action-link.btn-validate:hover {
    background: transparent !important;
}