/**
 * Certificates Styles
 *
 * @package Coursee
 * @since 1.0.0
 */

/* Template Selector */
.certificate-template-selector {
    margin-top: 1rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.template-item {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.template-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.template-item.selected {
    border-color: #0073aa;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.template-item input[type="radio"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin: 0;
}

.template-preview {
    width: 100%;
    height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f9f9f9;
}

.template-preview-inner {
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
}

.template-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.template-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Certificate Preview */
.certificate-preview-container {
    margin-top: 1rem;
}

.certificate-preview-canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    background: #fff;
    min-height: 400px;
    margin-bottom: 1rem;
    position: relative;
}

/* Certificate Templates - Premium Styles */
.certificate-template {
    width: 100%;
    min-height: 800px;
    position: relative;
}

/* Premium Gold Template */
.certificate-template.premium-gold {
    background: linear-gradient(135deg, #fffef7 0%, #fff9e6 100%);
    border: 12px solid;
    border-image: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%) 1;
    box-shadow: 
        0 0 0 8px rgba(212, 175, 55, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 0 100px rgba(212, 175, 55, 0.05);
}

/* Premium Modern Template */
.certificate-template.premium-modern {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

/* Premium Elegant Template */
.certificate-template.premium-elegant {
    background: #fffef7;
    border: 16px double #8b7355;
    box-shadow: 
        0 0 0 4px rgba(139, 115, 85, 0.1),
        0 0 0 8px rgba(139, 115, 85, 0.05),
        0 30px 80px rgba(0, 0, 0, 0.2);
}

/* Premium Minimal Template */
.certificate-template.premium-minimal {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Enhanced Template Selector */
.template-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

.template-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.template-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.template-preview {
    transition: transform 0.3s ease;
}

.template-item:hover .template-preview {
    transform: scale(1.02);
}

/* Certificate Template Base */
.certificate-template {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: #fff;
    position: relative;
}

.certificate-template.classic {
    border: 8px double #d4af37;
    background: #ffffff;
}

.certificate-template.modern {
    border: 2px solid #007bff;
    background: #f8f9fa;
}

.certificate-template.elegant {
    border: 6px solid #8b7355;
    background: #fffef7;
}

.certificate-template.minimal {
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

.certificate-template.professional {
    border: 4px solid #1a1a1a;
    background: #ffffff;
}

.certificate-template.academic {
    border: 5px solid #2c3e50;
    background: #fafafa;
}

.certificate-template.colorful {
    border: 6px solid #ff6b6b;
    background: #f0f4f8;
}

.certificate-template.vintage {
    border: 8px solid #8b6914;
    background: #f5e6d3;
}

.certificate-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.certificate-body {
    text-align: center;
    margin: 2rem 0;
}

.certificate-student-name {
    font-size: 2em;
    font-weight: bold;
    margin: 1.5rem 0;
    text-decoration: underline;
}

.certificate-course-name {
    font-size: 1.2em;
    margin: 1rem 0;
    font-style: italic;
}

.certificate-date {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9em;
}

.certificate-signature {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.certificate-signature-item {
    text-align: center;
    flex: 1;
}

.certificate-signature-line {
    border-top: 2px solid #333;
    width: 150px;
    margin: 0.5rem auto;
}

/* Responsive */
@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: 1fr;
    }

    .certificate-template {
        padding: 1.5rem;
    }

    .certificate-student-name {
        font-size: 1.5em;
    }
}

