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