/* ==========================================================================
   ACCEVE Certificate Verification Shortcode - Modern & Minimalist Design System
   ========================================================================== */

.certificate-verification-form,
.certificate-verification-form *,
.certificate-verification-form *::before,
.certificate-verification-form *::after,
.verification-result,
.verification-result *,
.verification-result *::before,
.verification-result *::after {
    box-sizing: border-box;
}

/* Main Verification Form Card */
.certificate-verification-form {
    max-width: 540px;
    width: 100%;
    margin: 2rem auto;
    padding: 2.25rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 
        0 1px 3px rgba(15, 23, 42, 0.04),
        0 10px 25px -5px rgba(15, 23, 42, 0.06),
        0 20px 48px -12px rgba(15, 23, 42, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.acceve-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.acceve-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    margin-bottom: 0.875rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.certificate-verification-form h2,
.acceve-form-title {
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.acceve-form-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    font-weight: 400;
}

/* Form Groups & Inputs */
.certificate-verification-form .form-group,
.acceve-form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.certificate-verification-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.acceve-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.acceve-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.certificate-verification-form input[type="text"],
.certificate-verification-form input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.65rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1.5;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.certificate-verification-form input[type="text"]::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.certificate-verification-form input[type="text"]:hover,
.certificate-verification-form input[type="date"]:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.certificate-verification-form input[type="text"]:focus,
.certificate-verification-form input[type="date"]:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.certificate-verification-form input:focus + .acceve-input-icon,
.acceve-input-wrap:focus-within .acceve-input-icon {
    color: #2563eb;
}

/* Submit Button */
.certificate-verification-form button,
.acceve-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.certificate-verification-form button:hover:not(:disabled),
.acceve-btn-submit:hover:not(:disabled) {
    transform: translateY(-1.5px);
    filter: brightness(1.06);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
}

.certificate-verification-form button:active:not(:disabled),
.acceve-btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.certificate-verification-form button:disabled,
.acceve-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.acceve-btn-spinner {
    animation: acceveSpin 0.8s linear infinite;
}

@keyframes acceveSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Verification Results - Modern Minimalist Design
   ========================================================================== */

.acceve-result-container {
    margin-top: 1.5rem;
}

.verification-result {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.06);
    animation: acceveFadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: left;
}

@keyframes acceveFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Valid Result Card */
.verification-result.valid,
.acceve-result-card--valid {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60px);
    box-shadow: 0 8px 30px -6px rgba(34, 197, 94, 0.12);
}

.acceve-result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.15rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid #e2e8f0;
}

.verification-result.valid .result-icon,
.acceve-valid-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #dcfce7;
    color: #16a34a;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.acceve-result-header-text {
    flex: 1;
}

.verification-result h3,
.acceve-valid-title {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.acceve-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.acceve-status-pill--active {
    background: #dcfce7;
    color: #15803d;
}

.acceve-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: accevePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes accevePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.15); }
}

/* Certificate Details Grid */
.certificate-details-main,
.acceve-details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.certificate-details-left,
.acceve-details-list {
    flex: 1 1 260px;
    margin: 0;
    padding: 0;
    border: none;
}

.certificate-details-right,
.acceve-details-aside {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.acceve-details-aside .acceve-cert-codes {
    margin: 0;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.acceve-details-aside .acceve-cert-code--qr .acceve-cert-code__media {
    width: 105px;
    height: 105px;
}

.acceve-details-aside .acceve-cert-code__caption {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.verification-result .detail-row,
.acceve-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 0.875rem;
    gap: 0.75rem;
}

.verification-result .detail-row:last-child,
.acceve-detail-row:last-child {
    border-bottom: none;
}

.verification-result .detail-label,
.acceve-detail-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}

.verification-result .detail-label svg,
.acceve-detail-label svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.verification-result .detail-value,
.acceve-detail-value {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.acceve-student-name {
    font-weight: 700;
    color: #0f172a;
}

.acceve-course-name {
    color: #2563eb;
    font-weight: 600;
}

.acceve-id-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
}

.acceve-verification-statement-wrap {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.acceve-verification-statement-wrap p {
    margin: 0 0 0.85rem;
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.5;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
}

/* Download PDF Button in Verification Details */
.certificate-actions {
    margin-top: 0.85rem;
    text-align: center;
}

.certificate-actions .download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: auto;
    min-width: 170px;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.certificate-actions .download-pdf:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

/* ==========================================================================
   Alert State Cards (Invalid, Expired, Inactive)
   ========================================================================== */

.acceve-result-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: 16px;
}

.acceve-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    font-size: 0;
}

.acceve-alert-content {
    flex: 1;
}

.acceve-alert-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.acceve-alert-desc {
    margin: 0;
    font-size: 0.825rem;
    line-height: 1.45;
    opacity: 0.9;
}

/* Invalid / Not Found State */
.verification-result.invalid,
.acceve-result-alert--invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.verification-result.invalid .acceve-alert-icon {
    background: #fee2e2;
    color: #dc2626;
}

.verification-result.invalid .acceve-alert-title {
    color: #991b1b;
}

.verification-result.invalid .acceve-alert-desc {
    color: #b91c1c;
}

/* Expired State */
.verification-result.expired,
.acceve-result-alert--expired {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.verification-result.expired .acceve-alert-icon {
    background: #fef3c7;
    color: #d97706;
}

.verification-result.expired .acceve-alert-title {
    color: #92400e;
}

.verification-result.expired .acceve-alert-desc {
    color: #b45309;
}

/* Inactive State */
.verification-result.inactive,
.acceve-result-alert--inactive {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.verification-result.inactive .acceve-alert-icon {
    background: #e2e8f0;
    color: #64748b;
}

.verification-result.inactive .acceve-alert-title {
    color: #334155;
}

.verification-result.inactive .acceve-alert-desc {
    color: #64748b;
}

.verification-detail-image {
    max-width: 200px;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Certificate template styles */
.certificate-template {
    max-width: 800px;
    margin: 30px auto;
    padding: 40px;
    background: #fff;
    border: 15px solid #f1c40f;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" opacity="0.05"><path d="M30,10 L70,10 L90,30 L90,70 L70,90 L30,90 L10,70 L10,30 Z" fill="none" stroke="black" stroke-width="2"/></svg>');
    background-size: 100px 100px;
}

.certificate-header {
    text-align: center;
    margin-bottom: 30px;
}

.certificate-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 36px;
    text-transform: uppercase;
}

.certificate-header .institution {
    font-size: 18px;
    color: #7f8c8d;
    margin-top: 10px;
}

.certificate-body {
    text-align: center;
    margin: 40px 0;
}

.certificate-body .award-text {
    font-size: 24px;
    margin-bottom: 30px;
}

.certificate-body .recipient-name {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
    margin: 20px 0;
    padding: 10px 0;
    border-top: 2px solid #eee;
    border-bottom: 2px solid #eee;
}

.certificate-body .course-name {
    font-size: 20px;
    font-style: italic;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.certificate-footer .signature {
    text-align: center;
    width: 200px;
}

.certificate-footer .signature-line {
    border-top: 1px solid #000;
    margin-top: 60px;
    width: 100%;
}

.certificate-footer .signature-name {
    margin-top: 5px;
    font-weight: bold;
}

.certificate-id {
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-size: 12px;
    color: #95a5a6;
}

.certificate-custom-fields {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.custom-field-item {
    margin-bottom: 12px;
}

.custom-field-label {
    font-weight: 600;
    margin-right: 8px;
}

/* Certificate list styles (used by custom templates) */
.cert-bullet-list {
    margin: 0;
    padding-left: 1.5em;
    list-style-position: outside;
    width: 100%;
    box-sizing: border-box;
}

.cert-bullet-list li {
    margin: 0 0 var(--cert-p-gap, 0.35em) 0;
    padding-left: 0.15em;
    line-height: inherit;
}

.cert-bullet-list li:last-child {
    margin-bottom: 0;
}

.cert-list-plain-item {
    margin: 0 0 var(--cert-p-gap, 0.35em) 0;
    line-height: inherit;
}

.cert-list-plain-item:last-child {
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .certificate-template {
        padding: 20px;
        margin: 20px auto;
    }

    .certificate-footer {
        flex-direction: column;
        align-items: center;
    }

    .certificate-footer .signature {
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .certificate-verification-form {
        padding: 1.5rem 1.15rem;
        margin: 1.5rem auto;
        border-radius: 16px;
    }

    .verification-result {
        padding: 1.25rem 1rem;
    }

    .acceve-details-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .verification-result .detail-row,
    .acceve-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .verification-result .detail-value,
    .acceve-detail-value {
        text-align: left;
    }
}

/* Screen reader only (share bar label) */
.acceve-sr-only {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Certificate share bar */
.acceve-certificate-share {
    max-width: 720px;
    margin: 2rem auto 0;
    position: relative;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.acceve-certificate-share__inner {
    position: relative;
    padding: 1.35rem 1.5rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px -12px rgba(15, 23, 42, 0.15);
}

.acceve-certificate-share__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(125deg, #38bdf8, #818cf8, #c084fc);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.45;
}

.acceve-certificate-share__header {
    text-align: center;
    margin-bottom: 1.1rem;
    position: relative;
    z-index: 1;
}

.acceve-certificate-share__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0ea5e9, #6366f1);
    color: #fff;
    margin-bottom: 0.5rem;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.acceve-certificate-share__title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.acceve-certificate-share__subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

.acceve-certificate-share__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.acceve-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

a.acceve-share-btn:hover,
button.acceve-share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    color: #fff;
}

a.acceve-share-btn:focus-visible,
button.acceve-share-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.acceve-share-btn--facebook { background: linear-gradient(145deg, #1877f2, #0c63d4); }
.acceve-share-btn--x { background: linear-gradient(145deg, #0f172a, #334155); }
.acceve-share-btn--linkedin { background: linear-gradient(145deg, #0a66c2, #004182); }
.acceve-share-btn--whatsapp { background: linear-gradient(145deg, #25d366, #128c7e); }
.acceve-share-btn--telegram { background: linear-gradient(145deg, #229ed9, #0088cc); }
.acceve-share-btn--email { background: linear-gradient(145deg, #64748b, #475569); }
.acceve-share-btn--native {
    display: none;
    background: linear-gradient(145deg, #0d9488, #0f766e);
}
.acceve-share-btn--native.is-visible {
    display: inline-flex;
}
.acceve-share-btn--copy {
    background: linear-gradient(145deg, #4f46e5, #4338ca);
}

.acceve-certificate-share__urlrow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.acceve-certificate-share__input {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.8125rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
}

.acceve-certificate-share__copypill {
    flex: 0 0 auto;
    padding: 0.65rem 1.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #f8fafc;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.acceve-certificate-share__copypill:hover {
    transform: translateY(-1px);
    color: #fff;
}

.acceve-certificate-share__toast {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: #0f172a;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    white-space: nowrap;
    z-index: 5;
}

.acceve-certificate-share__toast[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .acceve-certificate-share {
        margin-top: 1.5rem;
    }
    .acceve-certificate-share__inner {
        padding: 1.1rem 1rem;
    }
    .acceve-share-btn {
        width: 44px;
        height: 44px;
    }
}