/**
 * Clearwell ADR Frontend Styles
 * Add these styles to your existing frontend.css
 */

/* Consent Modal */
#cwadr-consent-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

#cwadr-consent-modal h3 {
    margin-top: 0;
    color: #2271b1;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

#cwadr-consent-form label {
    display: block;
    margin: 15px 0 5px;
    font-weight: 600;
}

#cwadr-consent-form input[type="text"],
#cwadr-consent-form input[type="date"],
#cwadr-consent-form select,
#cwadr-consent-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

#cwadr-consent-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

#cwadr-consent-form .checkbox-group {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

#cwadr-consent-form .checkbox-group label {
    font-weight: normal;
    margin: 5px 0;
}

#cwadr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

/* Buttons */
.cwadr-consent-btn {
    background-color: #46b450 !important;
    color: white !important;
    border-color: #3a9b44 !important;
}

.cwadr-consent-btn:hover {
    background-color: #3a9b44 !important;
}

.cwadr-withdraw-case {
    background-color: #dc3232 !important;
    color: white !important;
    border-color: #a00 !important;
}

.cwadr-withdraw-case:hover {
    background-color: #a00 !important;
}

.cwadr-withdraw-case:disabled {
    background-color: #ccc !important;
    border-color: #999 !important;
    cursor: not-allowed;
}

/* Notifications */
.cwadr-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
}

.cwadr-notification-success {
    background-color: #46b450;
}

.cwadr-notification-error {
    background-color: #dc3232;
}

.cwadr-notification-info {
    background-color: #0073aa;
}

/* Loading States */
.cwadr-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.cwadr-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ccc;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: cwadr-spinner 0.6s linear infinite;
}

@keyframes cwadr-spinner {
    to { transform: rotate(360deg); }
}

/* Long Text Toggle */
.cwadr-long-text {
    position: relative;
    max-width: 300px;
}

.cwadr-short-text,
.cwadr-full-text {
    word-wrap: break-word;
    line-height: 1.4;
}

.cwadr-full-text {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.cwadr-toggle-view {
    display: inline-block;
    margin-top: 5px;
    color: #2271b1;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
}

.cwadr-toggle-view:hover {
    text-decoration: underline;
}

/* File Links */
.cwadr-file-link {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #2271b1;
    text-decoration: none;
    font-size: 12px;
    margin: 2px 0;
}

.cwadr-file-link:hover {
    background: #e0e0e0;
}
.cwadr-submissions-table-container .cwadr-submissions-table th,.cwadr-submissions-table-container .cwadr-submissions-table td{
    text-wrap-mode: nowrap;
}.cwadr-submissions-table-container {
    scroll-behavior: smooth;
    overflow-x: auto;
}@media (min-width: 922px) {
   body .site-content .ast-container {
        display: flex;
        flex-direction: column!important;
    }}
/* Status Badges */
.cwadr-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cwadr-status-filed { background: #fff3cd; color: #856404; }
.cwadr-status-pending { background: #ffe5d0; color: #b45f06; }
.cwadr-status-active { background: #d1ecf1; color: #0c5460; }
.cwadr-status-closed { background: #e2e3e5; color: #383d41; }
.cwadr-status-approved { background: #d4edda; color: #155724; }

/* Deadline Indicators */
.cwadr-deadline-urgent {
    color: #dc3232;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Empty States */
.cwadr-no-cases {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.cwadr-no-cases p {
    margin: 0;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    #cwadr-consent-modal {
        padding: 20px;
        width: 95%;
    }
    
    .cwadr-notification {
        left: 20px;
        right: 20px;
        width: auto;
    }
    
    .cwadr-long-text {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .cwadr-consent-btn,
    .cwadr-withdraw-case {
        display: block;
        width: 100%;
        margin: 5px 0 !important;
    }
}

/* Print Styles */
@media print {
    .cwadr-consent-btn,
    .cwadr-withdraw-case,
    #cwadr-consent-modal,
    .cwadr-notification {
        display: none !important;
    }
}

/* Accessibility */
.cwadr-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
/* Status Badges */
.cwadr-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* Action Buttons */
.cwadr-actions {
    display: flex;
    white-space: nowrap;
    gap: 8px;
    flex-direction: column;
    align-content: center;
    justify-content: center;
}.cwadr-actions a{
    text-decoration: none;
}

.cwadr-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px;
    padding: 4px 10px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.cwadr-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.cwadr-view-case {
    background-color: #2271b1 !important;
    color: white !important;
    border-color: #2271b1 !important;
}

.cwadr-view-case:hover {
    background-color: #135e96 !important;
}

.cwadr-withdraw-case {
    background-color: #dc3232 !important;
    color: white !important;
    border-color: #a00 !important;
}

.cwadr-withdraw-case:hover {
    background-color: #a00 !important;
}

.cwadr-withdraw-case .spinner {
    float: none;
    margin: 0;
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
}

/* Modal Styles */
.cwadr-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cwadr-modal-content {
    background-color: #fff;
    margin: 1% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: cwadr-modal-slide 0.3s ease;
}

@keyframes cwadr-modal-slide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cwadr-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.cwadr-modal-header h3 {
    margin: 0;
    color: #2271b1;
}

.cwadr-modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.cwadr-modal-close:hover {
    color: #000;
}

.cwadr-modal-body {
    padding: 20px;
}

.cwadr-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.cwadr-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ccc;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: cwadr-spin 0.6s linear infinite;
}

@keyframes cwadr-spin {
    to { transform: rotate(360deg); }
}

/* Error States */
.cwadr-error {
    color: #dc3232;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Success Message */
.cwadr-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* No Submissions */
.cwadr-no-submissions {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

/* API Error */
.cwadr-api-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cwadr-actions .button {
        display: block;
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    
    .cwadr-status-grid {
        grid-template-columns: 1fr;
    }
    
    .cwadr-case-grid {
        grid-template-columns: 1fr;
    }
    
    .cwadr-details-table th {
        width: 120px;
    }
}
/* Focus States */
.cwadr-consent-btn:focus,
.cwadr-withdraw-case:focus,
.cwadr-file-link:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}