/**
 * Frontend CSS for Auction Deposit Payment
 */

/* Message notifications */
.adp-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: 90%;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.adp-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.adp-message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.adp-message-close:hover {
    opacity: 1;
}

.adp-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.adp-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.adp-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.adp-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Modal styles */
.adp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

.adp-modal-content {
    position: relative;
    background: #fff;
    max-width: 500px;
    margin: 50px auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: adp-modal-appear 0.3s ease-out;
}

@keyframes adp-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.adp-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.adp-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.adp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.adp-modal-close:hover {
    color: #495057;
    background: #f8f9fa;
}

.adp-modal-body {
    padding: 30px;
}

.adp-modal-body p {
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
}

.adp-terms-checkbox {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.adp-terms-checkbox label {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    cursor: pointer;
    margin: 0;
}

.adp-terms-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #007cba;
}

.adp-terms-checkbox a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.adp-terms-checkbox a:hover {
    text-decoration: underline;
}

.adp-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
}

.adp-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
}

.adp-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.adp-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.4);
    transform: translateY(-1px);
}

.adp-btn-primary:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.adp-btn-secondary {
    background: #fff;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.adp-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.adp-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.adp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: adp-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes adp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.adp-loading p {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .adp-modal-content {
        margin: 20px;
        max-width: none;
        border-radius: 8px;
    }
    
    .adp-modal-header {
        padding: 20px 20px 15px;
    }
    
    .adp-modal-header h3 {
        font-size: 20px;
    }
    
    .adp-modal-body {
        padding: 20px;
    }
    
    .adp-modal-body p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .adp-terms-checkbox {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .adp-modal-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .adp-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .adp-message {
        top: 10px;
        width: 95%;
        padding: 12px 15px;
    }
    
    .adp-message p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .adp-modal-content {
        margin: 10px;
    }
    
    .adp-modal-header {
        padding: 15px 15px 10px;
    }
    
    .adp-modal-header h3 {
        font-size: 18px;
    }
    
    .adp-modal-body {
        padding: 15px;
    }
    
    .adp-modal-footer {
        padding: 10px 15px 15px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .adp-modal-content {
        border: 2px solid #000;
    }
    
    .adp-btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .adp-btn-secondary {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .adp-modal-content {
        animation: none;
    }
    
    .adp-spinner {
        animation: none;
        border: 3px solid #007cba;
        border-radius: 50%;
    }
    
    .adp-btn {
        transition: none;
    }
    
    .adp-btn-primary:hover:not(:disabled) {
        transform: none;
    }
}

/* Focus styles for accessibility */
.adp-btn:focus,
.adp-modal-close:focus,
.adp-terms-checkbox input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .adp-modal,
    .adp-message {
        display: none !important;
    }
}
