/* Keychain Generator 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, #ec4899, #f43f5e); }
.bg-gradient-2 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.bg-gradient-3 { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.bg-gradient-4 { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.bg-gradient-5 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

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

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

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

.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);
    text-align: center;
}

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

/* Form Section Title */
h1.page-title, h2 {
    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;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

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

.format-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    gap: 0.5rem;
    user-select: none;
    transition: all 0.2s;
}

.format-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

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

.format-radio:hover .radio-custom {
    border-color: var(--primary-color);
}

.format-radio input:checked ~ .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.format-radio input:checked ~ .radio-custom:after {
    display: block;
}

.format-radio .radio-custom:after {
    left: 6px;
    top: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
}

/* 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;
}

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

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

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

.btn-secondary:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Ads placement styling */
.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;
    margin-top: 1rem;
}

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

.right-ad {
    height: 80vh;
}

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

/* SEO Section */
.footer-seo {
    margin-top: 3rem;
    padding: 2.5rem;
}

.footer-seo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #1e3a8a, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-seo p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* Media Queries for Responsiveness */
@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;
    }
}
