/* Frontend Styles for Diagnostic Reports Plugin */

.dr-report-access-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dr-form-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    border: 1px solid #e1e5e9;
}

.dr-form-container h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

/* Form Steps */
.dr-form-step {
    transition: opacity 0.3s ease;
}

.dr-form-step:not(.active) {
    display: none;
}

/* Field Groups */
.dr-field-group {
    margin-bottom: 25px;
}

.dr-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.dr-field-group input[type="tel"],
.dr-field-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.dr-field-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dr-field-help {
    display: block;
    margin-top: 6px;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
}

/* Buttons */
.dr-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.dr-btn-primary {
    background: #3498db;
    color: white;
}

.dr-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.dr-btn-secondary {
    background: #95a5a6;
    color: white;
}

.dr-btn-secondary:hover {
    background: #7f8c8d;
}

.dr-btn-download {
    background: #27ae60;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.dr-btn-download:hover {
    background: #229954;
    color: white;
    text-decoration: none;
}

/* Form Actions */
.dr-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dr-back-link {
    text-align: center;
    margin-top: 20px;
}

.dr-back-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.dr-back-link a:hover {
    text-decoration: underline;
}

/* Loading Indicator */
.dr-loading {
    text-align: center;
    padding: 40px 20px;
}

.dr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Messages */
.dr-messages {
    margin: 20px 0;
}

.dr-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
}

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

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

.dr-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Reports List */
.dr-reports-list {
    max-width: 800px;
}

.dr-reports-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.dr-reports-header h4 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 8px;
}

.dr-reports-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

.dr-reports-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.dr-report-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dr-report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.dr-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.dr-report-title {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.dr-report-type {
    background: #ecf0f1;
    color: #34495e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 15px;
}

.dr-report-details {
    margin-bottom: 20px;
}

.dr-report-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.dr-info-label {
    color: #7f8c8d;
    font-weight: 500;
}

.dr-info-value {
    color: #2c3e50;
    font-weight: 600;
}

.dr-report-actions {
    text-align: center;
}

/* No Reports State */
.dr-no-reports {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.dr-no-reports-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.dr-no-reports h4 {
    color: #34495e;
    font-size: 20px;
    margin-bottom: 12px;
}

.dr-no-reports p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Reports Footer */
.dr-reports-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.dr-download-note {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* OTP Success */
.dr-otp-success {
    text-align: center;
    padding: 30px 20px;
}

.dr-success-icon {
    width: 60px;
    height: 60px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.dr-otp-success h4 {
    color: #27ae60;
    margin-bottom: 10px;
}

.dr-otp-success p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dr-report-access-container {
        padding: 15px;
    }
    
    .dr-form-container {
        padding: 20px;
    }
    
    .dr-form-actions {
        flex-direction: column;
    }
    
    .dr-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .dr-report-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .dr-report-type {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .dr-report-info {
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .dr-form-container h3 {
        font-size: 20px;
    }
    
    .dr-field-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
