/* Public styles for Layanan Aduan plugin */

/* Form Styles */
.layanan-aduan-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.layanan-aduan-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 150px;
}

.submit-btn:hover {
    background: #005a87;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.form-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.form-info p {
    margin: 5px 0;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.error {
    color: #dc3545;
    font-weight: bold;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* reCAPTCHA */
.g-recaptcha {
    margin: 10px 0;
}

/* Report Styles */
.layanan-aduan-report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
}

.report-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.report-description {
    color: #666;
    font-size: 16px;
}

/* Statistics Cards */
.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #0073aa;
}

.stat-item.pending {
    border-top-color: #ffc107;
}

.stat-item.processing {
    border-top-color: #17a2b8;
}

.stat-item.completed {
    border-top-color: #28a745;
}

.stat-item.rejected {
    border-top-color: #dc3545;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

/* Charts */
.report-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.chart-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Info Cards */
.report-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h4 {
    margin-bottom: 15px;
    color: #333;
}

.completion-rate {
    text-align: center;
}

.rate-value {
    font-size: 32px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
}

.rate-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

.monthly-count {
    text-align: center;
}

.count-value {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
}

.count-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Recent Complaints */
.recent-complaints {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.recent-complaints h3 {
    margin-bottom: 20px;
    color: #333;
}

.complaints-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.complaint-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #f8f9fa;
}

.complaint-id {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}

.complaint-preview {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.complaint-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.complaint-date {
    color: #666;
}

.complaint-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-diproses {
    background: #d1ecf1;
    color: #0c5460;
}

.status-selesai {
    background: #d4edda;
    color: #155724;
}

.status-ditolak {
    background: #f8d7da;
    color: #721c24;
}

/* Summary */
.report-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.report-summary h3 {
    margin-bottom: 15px;
    color: #333;
}

.report-summary p {
    line-height: 1.6;
    color: #555;
}

/* Footer */
.report-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .layanan-aduan-form-container,
    .layanan-aduan-report-container {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .report-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .report-charts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .report-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .complaint-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .rate-value,
    .count-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
    }
    
    .report-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .layanan-aduan-form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .submit-btn {
        display: none;
    }
    
    .chart-container {
        break-inside: avoid;
    }
    
    .report-footer {
        page-break-before: avoid;
    }
}
