/* Certificate Validator Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&family=Lato:wght@300;400;700&display=swap');

.certificate-verification-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.certificate-verification-page .container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Verification Header */
.verification-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.verification-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.verification-icon.success {
    background: #27ae60;
    color: white;
}

.verification-icon.error {
    background: #e74c3c;
    color: white;
}

.verification-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.verification-status {
    font-size: 1.2em;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.verification-status.success {
    color: #d5f4e6;
}

.verification-status.error {
    color: #fadadd;
}

/* Certificate Display */
.certificate-display {
    margin: 40px 0;
}

.certificate-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    margin: 0 auto;
    max-width: 800px;
}

.certificate-template.public.modern {
    border: none;
    border-radius: 20px;
    position: relative;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}

.certificate-template.public.modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 48, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.certificate-border {
    position: relative;
    padding: 0;
}

.certificate-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 50px 40px 30px;
    text-align: center;
    position: relative;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: -20px;
}

.certificate-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #ff7f50, #ff6b35);
    border-radius: 2px;
}

.certificate-header h2 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.certificate-header .subtitle {
    font-size: 1.1em;
    margin-top: 15px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}

.certificate-logo {
    margin-bottom: 20px;
}

.certificate-logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 127, 80, 0.3);
}

.certificate-logo img {
    max-height: 50px;
    width: auto;
}

.certificate-body {
    padding: 60px 50px 40px;
    text-align: center;
    position: relative;
    z-index: 2;
    background: white;
}

.intro-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.completion-text {
    font-size: 1.3em;
    color: #555;
    margin: 40px 0;
    line-height: 1.6;
    font-weight: 300;
}

.recipient-name {
    font-size: 3.5em;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 40px 0;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
}

.recipient-name::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #ff7f50, #ff6b35);
    border-radius: 2px;
}

.course-hours {
    font-size: 2.2em;
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 40px 0;
    font-weight: 600;
    display: inline-block;
    padding: 15px 30px;
    border: 2px solid transparent;
    border-radius: 50px;
    position: relative;
}

.course-hours::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    border-radius: 50px;
    opacity: 0.1;
    z-index: -1;
}

.certificate-date {
    font-size: 1.1em;
    color: #777;
    margin-top: 50px;
    font-weight: 400;
}

.signature-section {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.signature-block {
    text-align: center;
    flex: 1;
    margin: 0 20px;
}

.signature-line {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    margin: 0 auto 15px;
    border-radius: 1px;
}

.signature-title {
    font-size: 0.9em;
    color: #666;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certificate-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #dee2e6;
    position: relative;
    z-index: 2;
}

.certificate-details {
    flex: 1;
}

.certificate-id {
    font-size: 1em;
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.issue-date {
    font-size: 0.9em;
    color: #666;
    font-weight: 400;
}

.verification-info {
    text-align: center;
    position: relative;
}

.qr-code {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.qr-code img {
    width: 90px;
    height: 90px;
    border: 3px solid white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
}

.verification-text {
    font-size: 0.8em;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Modern decorative elements */
.geometric-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.08;
}

.geometric-decoration.top-left {
    top: 80px;
    left: 40px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff7f50, #ff6b35);
    border-radius: 50% 0 50% 0;
    transform: rotate(45deg);
}

.geometric-decoration.top-right {
    top: 80px;
    right: 40px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    border-radius: 0 50% 0 50%;
    transform: rotate(-45deg);
}

.geometric-decoration.bottom-left {
    bottom: 80px;
    left: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #ff7f50, #ff6b35);
    transform: rotate(45deg);
}

.geometric-decoration.bottom-right {
    bottom: 80px;
    right: 40px;
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    border-radius: 50%;
}

/* Watermark pattern */
.watermark-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 120px;
    color: rgba(30, 60, 114, 0.02);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 20px;
    z-index: 1;
    pointer-events: none;
}

/* Certificate Actions */
.certificate-actions {
    text-align: center;
    margin: 40px 0;
}

.certificate-actions .button {
    margin: 5px 10px;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.button-primary {
    background: linear-gradient(135deg, #ff7f50, #ff6b35);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(255, 127, 80, 0.3);
    transition: all 0.3s ease;
}

.button-primary:hover {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 127, 80, 0.4);
    color: white;
}

.button-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}

.button-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    transform: translateY(-1px);
}

/* Verification Details */
.verification-details {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.verification-details h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
    font-size: 1.5em;
}

.verification-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.verification-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.verification-table td:first-child {
    width: 200px;
    font-weight: 500;
    background: #f8f9fa;
}

.verification-url {
    width: 60%;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f9f9f9;
}

.copy-url-btn {
    margin-left: 10px;
    padding: 5px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-url-btn:hover {
    background: #005177;
}

/* Error State */
.certificate-invalid {
    text-align: center;
    color: white;
}

.error-details {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-details h3 {
    margin-top: 0;
    color: white;
    font-size: 1.3em;
}

.error-details ul {
    list-style-type: none;
    padding: 0;
}

.error-details li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.error-details li::before {
    content: '•';
    color: #fadadd;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.error-actions {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .certificate-verification-page {
        padding: 20px 10px;
    }
    
    .verification-header h1 {
        font-size: 2em;
    }
    
    .recipient-name {
        font-size: 2em;
    }
    
    .course-hours {
        font-size: 1.5em;
    }
    
    .certificate-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .verification-table td:first-child {
        width: auto;
    }
    
    .verification-url {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .copy-url-btn {
        margin-left: 0;
        display: block;
        width: 100%;
    }
    
    .certificate-actions .button {
        display: block;
        margin: 10px 0;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .certificate-template.public {
        border: 4px solid #2c3e50;
    }
    
    .certificate-header {
        padding: 20px 15px 15px;
    }
    
    .certificate-header h2 {
        font-size: 1.8em;
    }
    
    .certificate-body {
        padding: 30px 20px;
    }
    
    .recipient-name {
        font-size: 1.8em;
    }
    
    .certificate-footer {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    .certificate-verification-page {
        background: white;
        padding: 0;
    }
    
    .verification-header,
    .certificate-actions,
    .verification-details {
        display: none;
    }
    
    .certificate-container {
        box-shadow: none;
        max-width: none;
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certificate-display {
    animation: fadeInUp 0.6s ease-out;
}

.verification-details {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Progress TM Certificate Template Styles - Exact Match */
.certificate-verification-page.progress-tm-view {
    background: #e8ecef;
    padding: 20px;
}

.certificate-verification-page.progress-tm-view .verification-header h1 {
    color: #2c3e50;
    text-shadow: none;
}

.certificate-verification-page.progress-tm-view .verification-status {
    color: #34495e;
}

.certificate-template.progress-tm {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 1.414; /* A4 landscape ratio */
    margin: 0 auto;
}

.certificate-template.progress-tm .certificate-container {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
}

/* Left Teal Panel - Exactly as in template */
.certificate-template.progress-tm .left-panel {
    width: 300px;
    background: linear-gradient(135deg, #20B2AA 0%, #008B8B 50%, #006B6B 100%);
    position: relative;
    overflow: hidden;
}

.certificate-template.progress-tm .left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" patternUnits="objectBoundingBox" width="0.1" height="0.1"><circle cx="5" cy="5" r="0.8" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
}

.certificate-template.progress-tm .left-panel::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* Right Content Panel */
.certificate-template.progress-tm .right-panel {
    flex: 1;
    padding: 60px 50px;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Certificate Title Section */
.certificate-template.progress-tm .certificate-title {
    text-align: center;
    margin-bottom: 40px;
}

.certificate-template.progress-tm .certificate-title h1 {
    font-family: 'Merriweather', serif;
    font-size: 48px;
    font-weight: 900;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.certificate-template.progress-tm .certificate-title h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    font-weight: 400;
    color: #34495e;
    margin: 10px 0 0 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Main Content Area */
.certificate-template.progress-tm .certificate-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

.certificate-template.progress-tm .presentation-text {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-style: italic;
    font-weight: 300;
}

.certificate-template.progress-tm .recipient-name {
    font-family: 'Merriweather', serif;
    font-size: 42px;
    font-weight: 700;
    color: #20B2AA;
    margin: 30px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(32, 178, 170, 0.1);
}

.certificate-template.progress-tm .participation-text {
    font-family: 'Merriweather', serif;
    font-size: 18px;
    color: #2c3e50;
    margin: 30px 0;
    line-height: 1.6;
    font-weight: 400;
}

.certificate-template.progress-tm .course-name {
    font-weight: 700;
    color: #20B2AA;
    text-transform: uppercase;
    font-size: 20px;
}

.certificate-template.progress-tm .date-text {
    font-family: 'Merriweather', serif;
    font-size: 16px;
    color: #7f8c8d;
    margin-top: 40px;
    font-style: italic;
    font-weight: 300;
}

/* Footer Section */
.certificate-template.progress-tm .certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

/* Progress Logo Section */
.certificate-template.progress-tm .logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.certificate-template.progress-tm .progress-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #20B2AA, #008B8B);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
}

.certificate-template.progress-tm .progress-logo::before {
    content: 'P';
    color: white;
    font-size: 32px;
    font-weight: 900;
    font-family: 'Merriweather', serif;
}

.certificate-template.progress-tm .company-info {
    display: flex;
    flex-direction: column;
}

.certificate-template.progress-tm .company-name {
    font-family: 'Merriweather', serif;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.certificate-template.progress-tm .company-tagline {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #20B2AA;
    font-style: italic;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Signature Section */
.certificate-template.progress-tm .signature-section {
    text-align: center;
}

.certificate-template.progress-tm .signature-line {
    width: 150px;
    height: 2px;
    background: #34495e;
    margin: 0 auto 10px auto;
}

.certificate-template.progress-tm .signature-name {
    font-family: 'Merriweather', serif;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 400;
}

.certificate-template.progress-tm .signature-title {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* QR Code positioned in bottom right of right panel */
.certificate-template.progress-tm .qr-code-section {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.certificate-template.progress-tm .qr-code-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 4px;
}

/* Certificate Actions Simple */
.certificate-actions-simple {
    text-align: center;
    margin: 40px 0;
}

.certificate-actions-simple .download-pdf-primary {
    background: linear-gradient(135deg, #20B2AA, #008B8B);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
    transition: all 0.3s ease;
}

.certificate-actions-simple .download-pdf-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 178, 170, 0.4);
    text-decoration: none;
    color: white;
}

.certificate-actions-simple .download-pdf-primary .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Certificate ID Display */
.certificate-id-display {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.certificate-id-display p {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .certificate-template.progress-tm .certificate-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .certificate-template.progress-tm .left-panel {
        width: 100%;
        height: 150px;
    }
    
    .certificate-template.progress-tm .right-panel {
        padding: 40px 30px;
    }
    
    .certificate-template.progress-tm .certificate-title h1 {
        font-size: 36px;
    }
    
    .certificate-template.progress-tm .certificate-title h2 {
        font-size: 24px;
    }
    
    .certificate-template.progress-tm .recipient-name {
        font-size: 32px;
    }
    
    .certificate-template.progress-tm .certificate-footer {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }
    
    .certificate-template.progress-tm .qr-code-section {
        position: static;
        margin-top: 20px;
        text-align: center;
    }
}