 /* Styles for the product verification form */
:root {
    --primary-color: #0073aa;
    --primary-dark: #005f8a;
    --success-color: #3c763d;
    --success-bg: #dff0d8;
    --success-border: #d6e9c6;
    --error-color: #a94442;
    --error-bg: #f2dede;
    --error-border: #ebccd1;
    --warning-color: #31708f;
    --warning-bg: #d9edf7;
    --warning-border: #bce8f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Main form container */
#dh-pac-verification-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#dh-pac-verification-form:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Form header */
#dh-pac-verification-form h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 500;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Form labels */
#dh-pac-verification-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 15px;
    position: relative;
}

/* Form field tooltip icon */
.form-field-tip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #e0e0e0;
    color: #555;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 5px;
    cursor: pointer;
}

/* Form field hint/tooltip */
.field-hint {
    display: none;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    position: relative;
}

.field-hint:after {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #f9f9f9;
}

.field-hint:before {
    content: '';
    position: absolute;
    top: -9px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e0e0e0;
}

/* Form inputs and select dropdowns */
#dh-pac-verification-form input,
#dh-pac-verification-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#dh-pac-verification-form input:focus,
#dh-pac-verification-form select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

/* Validation error styling */
#dh-pac-verification-form input.validation-error,
#dh-pac-verification-form select.validation-error {
    border-color: #d9534f;
}

#dh-pac-verification-form input.validation-error:focus,
#dh-pac-verification-form select.validation-error:focus {
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.2);
}

.validation-errors {
    background-color: #fff1f0;
    color: #d9534f;
    border: 1px solid #ffd7d5;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.validation-errors ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.validation-errors li {
    margin-bottom: 5px;
}

/* Form submit button */
#dh-pac-verification-form button {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#dh-pac-verification-form button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#dh-pac-verification-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Result container */
#dh-pac-result {
    max-width: 600px;
    margin: 25px auto;
    text-align: center;
}

/* Success message styling */
.success {
    position: relative;
    color: var(--success-color);
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(60, 118, 61, 0.1);
}

/* Error message styling */
.error {
    position: relative;
    color: var(--error-color);
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(169, 68, 66, 0.1);
}

/* Loading indicator styling */
.loading {
    position: relative;
    color: var(--warning-color);
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(49, 112, 143, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Spinner animation */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result icon styling */
.result-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
}

/* Try again button */
.retry-btn {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Share button */
.share-result {
    margin-top: 20px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #4267B2;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: #365899;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

/* Store details section */
#store-details {
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

/* Geolocation modal */
.geo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.geo-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.geo-modal-content h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

.geo-modal-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 15px;
}

.geo-btn {
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s ease;
    border: none;
}

.geo-modal-content.requesting .geo-btn {
    pointer-events: none;
    opacity: 0.8;
}

.geo-allow {
    background-color: var(--primary-color);
    color: white;
}

.geo-allow:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.geo-try-again {
    background-color: #17a2b8;
    color: white;
}

.geo-try-again:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.geo-help {
    background-color: #6c757d;
    color: white;
}

.geo-help:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.geo-deny {
    background-color: #f0f0f0;
    color: #666;
}

.geo-deny:hover {
    background-color: #e0e0e0;
}

.geo-notice {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin: 15px 0;
    text-align: left;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.geo-icon-alert {
    margin-right: 10px;
    font-size: 20px;
}

/* Error message and help panel */
.geo-error-message {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    border-left: 5px solid #dc3545;
}

.geo-error-message h4 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 15px;
}

.geo-error-message ul,
.geo-error-message ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.geo-error-message li {
    margin-bottom: 5px;
}

.geo-icon-error {
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Help panel styling */
.geo-help-panel {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
}

.geo-help-panel h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.geo-help-panel h5 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
}

.browser-instructions {
    margin-top: 15px;
}

.browser-option {
    margin-bottom: 20px;
}

.browser-option strong {
    color: #333;
}

.browser-option ol {
    margin-top: 5px;
    margin-left: 25px;
}

.geo-help-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    font-style: italic;
    color: #666;
}

/* Location status indicators */
.location-status-warning,
.location-status-error,
.location-status-success {
    padding: 8px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-status-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.location-status-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.location-status-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.browser-warning-notice {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.location-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* Geolocation status banners */
.geo-success-banner,
.geo-error-banner,
.geo-warning-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.geo-success-banner {
    background-color: #4caf50;
}

.geo-error-banner {
    background-color: #f44336;
}

.geo-warning-banner {
    background-color: #ff9800;
}

.geo-icon {
    margin-right: 10px;
}

.geo-close {
    margin-left: 15px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Verification certificate and result styles */
.verification-certificate {
    background-color: #fff;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-image: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 25%, transparent 25%, transparent 50%, rgba(40, 167, 69, 0.05) 50%, rgba(40, 167, 69, 0.05) 75%, transparent 75%, transparent);
    background-size: 60px 60px;
    animation: certificateBackgroundShift 60s linear infinite;
}

@keyframes certificateBackgroundShift {
    from { background-position: 0 0; }
    to { background-position: 600px 600px; }
}

/* Style for previous verification certificates */
.verification-certificate.previous-verification {
    border-color: #ffc107;
    background-image: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 193, 7, 0.05) 50%, rgba(255, 193, 7, 0.05) 75%, transparent 75%, transparent);
}

.cert-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.cert-logo {
    width: 180px;
    height: 60px;
    margin-bottom: 15px;
    background-image: url('../images/drharle-logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.previous-verification .cert-logo {
    opacity: 0.8;
}

.verification-certificate h4 {
    color: #28a745;
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.previous-verification h4 {
    color: #856404;
}

.certificate-details {
    text-align: left;
    font-size: 14px;
    padding: 5px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.8);
}

.cert-detail-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 10px;
}

.cert-detail {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    background-color: rgba(40, 167, 69, 0.05);
    border-radius: 5px;
    border-left: 3px solid #28a745;
}

.previous-verification .cert-detail {
    background-color: rgba(255, 193, 7, 0.05);
    border-left: 3px solid #ffc107;
}

.cert-detail span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.cert-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.cert-seal {
    width: 40px;
    height: 40px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='white' d='M512 256c0 141.4-114.6 256-256 256S0 397.4 0 256 114.6 0 256 0s256 114.6 256 256zM160 320c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm96-96c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm-32 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm128-32c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
    position: relative;
}

.cert-seal:after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed #28a745;
    border-radius: 50%;
    animation: rotateSeal 30s linear infinite;
}

@keyframes rotateSeal {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cert-sig-text {
    font-style: italic;
    color: #666;
    font-size: 13px;
}

.cert-notice {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ffc107;
    display: flex;
    align-items: center;
}

.cert-notice-icon {
    font-size: 18px;
    margin-right: 10px;
    color: #856404;
}

.cert-notice-text {
    font-size: 13px;
    color: #856404;
}

.verification-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.error-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.support-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.support-btn:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

.already-verified-notice {
    background-color: #f8f9fa;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #dh-pac-verification-form {
        width: 90%;
        padding: 20px;
        margin: 20px auto;
    }
    
    #dh-pac-verification-form h2 {
        font-size: 24px;
    }
    
    .geo-modal-content {
        width: 85%;
        padding: 20px;
    }
    
    .geo-btn {
        width: 100%;
        margin: 10px 0;
    }
    
    .geo-success-banner,
    .geo-error-banner,
    .geo-warning-banner {
        left: 20px;
        right: 20px;
        text-align: center;
    }
    
    /* Certificate responsive styles */
    .verification-certificate {
        padding: 15px;
        margin: 15px 0;
        background-size: 40px 40px;
    }
    
    .cert-header {
        flex-direction: column;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .cert-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .cert-detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .cert-detail {
        min-width: 100%;
        padding: 8px;
    }
    
    .cert-signature {
        flex-direction: column;
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .cert-seal {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .cert-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .cert-notice-icon {
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 20px;
    }
    
    .share-result,
    .verification-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn,
    .secondary-btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .retry-btn,
    .support-btn {
        width: 100%;
    }
}