/**
 * Frontend C2PA badge styles for Encypher WordPress plugin.
 *
 * Uses Encypher brand colors:
 * - Deep Navy: #1B2F50
 * - Azure Blue: #2A87C4
 * - Light Sky Blue: #B7D5ED
 * - Pure White: #FFFFFF
 * - Neutral Gray: #A7AFBC
 */

/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Apply Roboto to all plugin elements */
.encypher-c2pa-badge,
.encypher-c2pa-modal,
.encypher-c2pa-modal *,
.encypher-verification-success,
.encypher-verification-success * {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Icon Badge Button */
.encypher-c2pa-badge {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
}

.encypher-c2pa-badge:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.encypher-c2pa-badge:focus {
    outline: 2px solid #2A87C4;
    outline-offset: 2px;
}

.encypher-c2pa-badge .badge-tier {
    background: #2A87C4;
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.encypher-c2pa-badge.encypher-tier-enterprise .badge-tier {
    background: #00a32a;
}

.encypher-c2pa-badge.encypher-tier-enterprise {
    border-color: #00a32a;
}

.encypher-c2pa-badge-icon {
    width: 48px;
    height: 48px;
    display: block;
}

.encypher-c2pa-badge-wrapper {
    width: 100%;
}

.encypher-c2pa-badge-top {
    margin: 0 0 24px;
}

.encypher-c2pa-badge-bottom {
    margin: 40px 0 60px;
}

/* Floating badge positioning */
.encypher-c2pa-badge-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Styles */
.encypher-c2pa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.encypher-c2pa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.encypher-c2pa-modal-content {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(27, 47, 80, 0.3);
    max-height: calc(100vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.encypher-c2pa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #B7D5ED;
}

.encypher-c2pa-modal-logo {
    height: 32px;
    width: auto;
}

.encypher-c2pa-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #A7AFBC;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.encypher-c2pa-modal-close:hover {
    color: #1B2F50;
}

.encypher-c2pa-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.encypher-c2pa-modal-body h2 {
    margin: 0 0 20px 0;
    color: #1B2F50;
    font-size: 24px;
}

.encypher-c2pa-modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.encypher-c2pa-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid #B7D5ED;
    border-top-color: #2A87C4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.encypher-c2pa-modal-loading p {
    color: #A7AFBC;
    margin: 0;
}

/* Verification Result Styles */
.encypher-verification-success {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.encypher-status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.encypher-status-verified {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.encypher-verification-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.encypher-verification-table th {
    background: #1B2F50;
    color: #FFFFFF;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.encypher-verification-table td {
    padding: 12px;
    border-bottom: 1px solid #B7D5ED;
}

.encypher-verification-table td:first-child {
    font-weight: 600;
    color: #1B2F50;
    width: 40%;
}

.encypher-verification-table td:last-child {
    color: #333;
}

.encypher-verification-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

.encypher-error {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .encypher-c2pa-badge-icon {
        width: 40px;
        height: 40px;
    }

    .encypher-c2pa-badge-floating {
        bottom: 10px;
        right: 10px;
    }

    .encypher-c2pa-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .encypher-c2pa-modal-header {
        padding: 16px;
    }

    .encypher-c2pa-modal-logo {
        height: 24px;
    }

    .encypher-c2pa-modal-body {
        padding: 16px;
    }

    .encypher-c2pa-modal-body h2 {
        font-size: 20px;
    }

    .encypher-verification-table {
        font-size: 14px;
    }

    .encypher-verification-table th,
    .encypher-verification-table td {
        padding: 8px;
    }
}

/* Print styles */
@media print {
    .encypher-c2pa-badge-floating,
    .encypher-c2pa-modal {
        display: none !important;
    }
}
