/* BankID-inspired certificate style */
#certificate-lookup-container {
    max-width: 400px;
    margin: 40px auto;
    background: #f6fafd;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,40,80,0.10);
    padding: 32px 24px;
    font-family: 'Segoe UI', Arial, sans-serif;
}
#certificate-lookup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#certificate-lookup-form input[type="text"] {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #b3c6d9;
    font-size: 1.1em;
}
#certificate-lookup-form button {
    background: #0072c6;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
#certificate-lookup-form button:hover {
    background: #005fa3;
}
#certificate-result {
    margin-top: 24px;
    background: linear-gradient(120deg, #eaf6ff, #f0f9ff);
    border: 2px solid #0072c6;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    position: relative;
    animation: fadeIn 0.5s;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

#certificate-result .wave-background {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    transition: transform 0.3s ease-out;
}

#certificate-result .wave {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(0, 114, 198, 0.03) 0%,
        rgba(0, 114, 198, 0.06) 45%,
        rgba(0, 114, 198, 0.09) 50%,
        rgba(0, 114, 198, 0.06) 55%,
        rgba(0, 114, 198, 0.03) 100%
    );
    border-radius: 42%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: wave-spin var(--duration) infinite linear;
    transform-origin: center center;
    will-change: transform;
}

#certificate-result .wave:nth-child(1) {
    --duration: 12s;
}

#certificate-result .wave:nth-child(2) {
    --duration: 16s;
    animation-direction: reverse;
}

#certificate-result .wave:nth-child(3) {
    --duration: 20s;
}

@keyframes wave-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#certificate-result::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        transparent 70%
    );
    pointer-events: none;
    opacity: 0.7;
    transition: all 0.3s ease-out;
    transform: translate3d(0, 0, 0);
}

.wave-background {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.7;
    transform-origin: center center;
    transition: transform 0.3s ease-out;
}

.wave {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(0, 114, 198, 0.02) 0%,
        rgba(0, 114, 198, 0.05) 45%,
        rgba(0, 114, 198, 0.08) 50%,
        rgba(0, 114, 198, 0.05) 55%,
        rgba(0, 114, 198, 0.02) 100%
    );
    border-radius: 43%;
    transition: all 0.5s ease-out;
    transform-origin: center center;
}

.wave:nth-child(1) {
    animation-duration: 12s;
    opacity: 0.3;
}

.wave:nth-child(2) {
    animation-duration: 16s;
    opacity: 0.2;
}

.wave:nth-child(3) {
    animation-duration: 20s;
    opacity: 0.1;
}

#certificate-result:hover .wave {
    opacity: 1;
}

.wave:nth-child(1) {
    animation: wave-rotate1 12s linear infinite;
}

.wave:nth-child(2) {
    animation: wave-rotate2 16s linear infinite;
}

.wave:nth-child(3) {
    animation: wave-rotate3 20s linear infinite;
}

@keyframes wave-rotate1 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wave-rotate2 {
    0% { transform: rotate(120deg); }
    100% { transform: rotate(480deg); }
}

@keyframes wave-rotate3 {
    0% { transform: rotate(240deg); }
    100% { transform: rotate(600deg); }
}

#certificate-result > * {
    position: relative;
    z-index: 1;
}

.certificate-details {
    margin: 20px 0;
    text-align: left;
}

.detail-row {
    padding: 10px;
    border-bottom: 1px solid rgba(0,114,198,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #0072c6;
    margin-right: 10px;
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

.detail-row span {
    color: #333;
    font-weight: 500;
    flex: 1;
    text-align: right;
}
#certificate-result .bankid-badge {
    display: inline-block;
    background: #0072c6;
    color: #fff;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    line-height: 54px;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 12px;
}
#certificate-result .seal {
    display: inline-block;
    background: #fff;
    border: 2px solid #0072c6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 1.2em;
    color: #0072c6;
    margin-left: 8px;
}
#certificate-result .timer {
    position: absolute;
    top: 8px;
    right: 18px;
    font-size: 0.95em;
    color: #0072c6;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.error-message {
    color: #721c24;
    background-color: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 16px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease-in-out;
}

.error-icon {
    font-size: 24px;
    color: #dc3545;
    flex-shrink: 0;
}

.error-text {
    flex: 1;
    font-weight: 500;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
