/**
 * Certificate Preview Plugin Styles
 */

.certificate-preview-page {
    padding: 40px 0;
    min-height: 70vh;
    background: #f8f9fa;
    animation: page-celebration 0.5s ease-out;
}

@keyframes page-celebration {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.certificate-preview-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.certificate-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 32px;
    font-weight: 700;
}

.recipient-name {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.certificate-preview {
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.certificate-embed {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.certificate-embed iframe {
    display: block;
    border: none;
    width: 100%;
    transition: opacity 0.3s ease;
}

/* HD Preview Image Styles */
.certificate-hd-preview {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.certificate-hd-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}


/* Enhanced Action Buttons */
.certificate-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 25px;
}


.certificate-actions .certificate-btn {
    background: rgb(65 66 136);
    color: white;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: none;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 1.2px;
}

/* HD Modal Enhancements */
.hd-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hd-modal-content img {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Quality Indicators */
.hd-quality-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 100;
}

/* Loading States */
.certificate-hd-image.loading {
    opacity: 0.7;
    position: relative;
}

.certificate-hd-image.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.certificate-actions {
    text-align: center;
    padding: 0 0 20px;
}

.certificate-btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.certificate-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.certificate-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.certificate-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.certificate-btn-secondary:hover {
    background-color: #545b62;
    color: white;
    transform: translateY(-2px);
}

.certificate-meta {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    color: #666;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.certificate-not-found,
.certificate-error {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.certificate-not-found h1 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 28px;
}

.certificate-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Loading Animation */
.certificate-loading {
    text-align: center;
    padding: 40px;
}

.certificate-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Social Share Buttons */
.certificate-share {
    text-align: center;
    margin: 0 0 30px 0;
    padding: 20px;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.certificate-share h3 {
    margin-bottom: 15px;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn.linkedin {
    background-color: #0077b5;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.facebook {
    background-color: #3b5998;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .certificate-preview-page {
        padding: 20px 0;
    }

    .certificate-embed iframe {
        height: 400px;
    }

    .certificate-title {
        font-size: 24px;
    }

    .recipient-name {
        font-size: 16px;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .certificate-preview-page .container {
        padding: 0 10px;
    }

    .certificate-embed iframe {
        height: 300px;
    }

    .certificate-title {
        font-size: 20px;
    }
}

/* Admin Page Styles */
.cccp-admin-test-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.cccp-admin-test-result {
    margin-top: 15px;
}

.cccp-admin-test-output {
    background: white;
    padding: 15px;
    border-radius: 3px;
    font-family: monospace;
}

.cccp-admin-features-section {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.cccp-admin-features-list {
    margin-left: 20px;
}

.cccp-admin-test-success {
    color: #00a32a;
}

.cccp-admin-test-error {
    color: #d63638;
}

/* Certificate HD Preview Helper Text */
.certificate-hd-preview-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Enhanced inline style replacements */
.certificate-hd-image {
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Confetti animation pieces - Disabled */
.confetti-piece {
    display: none !important;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Enhanced certificate title animation */
.certificate-title {
    animation: title-celebration 2s ease-out;
}

@keyframes title-celebration {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px) scale(1.05);
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        text-shadow: none;
    }
}

/* Confetti animation for visibility */
@keyframes confetti-show {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    20% {
        opacity: 1;
        visibility: visible;
    }

    80% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* HD Modal Styles */
.hd-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.hd-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 95%;
    height: 95%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hd-modal-content img {
    max-width: 100%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.hd-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.hd-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hd-modal-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hd-quality-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hd-quality-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hd-quality-btn.active {
    background: rgba(102, 126, 234, 0.7);
    border-color: rgba(102, 126, 234, 1);
}

/* Confetti Container - Disabled */
.confetti-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Auto-hide confetti after animation */
@keyframes confetti-cleanup {
    0% {
        opacity: 1;
        visibility: visible;
    }

    90% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Mobile responsive adjustments for modal */
@media (max-width: 768px) {
    .certificate-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .certificate-actions .certificate-btn {
        width: 200px;
        text-align: center;
    }

    .hd-modal-controls {
        flex-direction: column;
        align-items: center;
    }

    .hd-quality-btn {
        width: 120px;
        text-align: center;
    }

    /* Responsive confetti */
    .confetti-piece {
        width: 6px;
        height: 6px;
    }

    .confetti-piece:nth-child(even) {
        width: 4px;
        height: 8px;
    }

    .confetti-piece:nth-child(3n) {
        width: 8px;
        height: 4px;
    }
}

#top {
    display: none;
}

.btn-secondary-alt {
    background-color: #C2CAE8;
    color: #414288 !important;
}