/* Family Nameplate Specific Styles */

.layout-grid {
    display: grid;
    grid-template-columns: 280px 380px 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

/* Accent Color - Vibrant Cobalt Blue */
:root {
    --primary-color: #2563eb; 
    --primary-hover: #1d4ed8;
}

.bg-gradient-1 { background: linear-gradient(135deg, #10b981, #34d399); }
.bg-gradient-2 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.bg-gradient-3 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.bg-gradient-4 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.template-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.template-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

@media (max-width: 1400px) {
    .layout-grid {
        grid-template-columns: 250px 350px 1fr;
    }
    .large-ad { display: none; }
}

@media (max-width: 1100px) {
    .layout-grid {
        grid-template-columns: 250px 1fr;
    }
    .viewer-section {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .viewer-section {
        grid-column: span 1;
        order: 1;
    }
    .form-section {
        order: 2;
    }
    .template-sidebar {
        order: 3;
        height: auto;
        padding: 1rem;
    }
    .template-grid {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .template-card {
        flex: 0 0 160px;
    }
    .viewer-container {
        height: 400px;
    }
}

/* Sidebar Styles */
.template-sidebar {
    height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.template-sidebar h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.template-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 1rem;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    text-align: center;
}

.template-card:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-preview {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.template-card p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.template-card.active p {
    color: var(--text-main);
}

/* Form Styles */
.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.format-selection {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.format-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(15, 23, 42, 0.15);
    background: #ffffff;
    border-radius: 50%;
    position: relative;
    transition: border-color 0.2s;
}

.format-radio input {
    display: none;
}

.format-radio input:checked + .radio-custom {
    border-color: var(--primary-color);
}

.format-radio input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Viewer Header */
.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.05);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ads */
.ad-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--border-color);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.horizontal-ad {
    height: 90px;
    margin-top: 2rem;
}

.right-ad {
    height: 80vh;
}

.ad-placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #1e3a8a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
