/**
 * Smart Report Download Manager - Frontend Styles
 *
 * @package SmartReportDownloadManager
 * @since 1.0.0
 */

/* ===================================
   Download Button
   =================================== */
.srdm-download-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.srdm-download-btn:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.srdm-download-btn:active {
    transform: translateY(0);
}

.srdm-download-btn:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

/* ===================================
   Modal
   =================================== */
.srdm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

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

.srdm-modal-content {
    position: relative;
    max-width: 500px;
    margin: 50px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: srdmSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes srdmSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.srdm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.srdm-modal-close:hover {
    color: #000;
}

.srdm-modal-header {
    margin-bottom: 30px;
}

.srdm-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.srdm-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.srdm-modal-subtitle strong {
    color: #0073aa;
    font-weight: 600;
}

/* Prevent body scroll when modal is open */
body.srdm-modal-open {
    overflow: hidden;
}

/* ===================================
   Form Styles
   =================================== */
.srdm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.srdm-form-group {
    display: flex;
    flex-direction: column;
}

.srdm-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.srdm-form-group label .required {
    color: #dc3232;
}

.srdm-form-group input[type="text"],
.srdm-form-group input[type="email"] {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.srdm-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.srdm-form-group input::placeholder {
    color: #999;
}

/* ===================================
   Form Messages
   =================================== */
.srdm-form-message {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.srdm-form-message.srdm-error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.srdm-form-message.srdm-success {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.srdm-message-icon {
    font-weight: bold;
    font-size: 16px;
}

/* ===================================
   Form Actions
   =================================== */
.srdm-form-actions {
    margin-top: 10px;
}

.srdm-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.srdm-submit-btn:hover:not(:disabled) {
    background-color: #005a87;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.srdm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.srdm-submit-btn:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

/* ===================================
   Error Display (for admins)
   =================================== */
.srdm-error {
    padding: 12px;
    background-color: #fef2f2;
    border-left: 4px solid #dc3232;
    color: #991b1b;
    font-size: 14px;
}

/* ===================================
   Responsive Design
   =================================== */
@media screen and (max-width: 600px) {
    .srdm-modal-content {
        margin: 20px;
        padding: 30px 20px;
        max-height: calc(100vh - 40px);
    }
    
    .srdm-modal-header h2 {
        font-size: 20px;
    }
    
    .srdm-download-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===================================
   Accessibility
   =================================== */
.srdm-download-btn:focus-visible,
.srdm-submit-btn:focus-visible,
.srdm-modal-close:focus-visible,
.srdm-form-group input:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .srdm-download-btn,
    .srdm-submit-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .srdm-modal-content {
        animation: none;
    }
    
    .srdm-download-btn,
    .srdm-submit-btn,
    .srdm-modal-close,
    .srdm-form-group input {
        transition: none;
    }
}
