/* Attendance Calculator Plugin Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.attendance-calculator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    min-height: 100vh;
}

.ac-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header Styles */
.ac-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.ac-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ac-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* Form Section */
.ac-form-section {
    padding: 40px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.ac-form-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
}

.ac-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.ac-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ac-form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ac-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Button Styles */
.ac-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.ac-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ac-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ac-btn-primary:active {
    transform: translateY(0);
}

.ac-btn-danger {
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
}

.ac-btn-danger:hover {
    background: #ff5252;
}

/* Records Section */
.ac-records-section {
    padding: 40px 30px;
}

.ac-records-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
}

.ac-records-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Record Card */
.ac-record-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ac-record-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.ac-record-card.present {
    border-left: 4px solid #51cf66;
}

.ac-record-card.absent {
    border-left: 4px solid #ff6b6b;
}

.ac-student-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    word-break: break-word;
}

.ac-record-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 13px;
}

.ac-info-item {
    display: flex;
    flex-direction: column;
}

.ac-info-label {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.ac-info-value {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

/* Attendance Percentage */
.ac-percentage-bar {
    margin-bottom: 15px;
}

.ac-percentage-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.ac-percentage-label-text {
    color: #666;
    font-weight: 600;
}

.ac-percentage-value {
    color: #667eea;
    font-weight: 700;
    font-size: 14px;
}

.ac-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.ac-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ac-progress-fill.excellent {
    background: linear-gradient(90deg, #51cf66 0%, #37b24d 100%);
}

.ac-progress-fill.good {
    background: linear-gradient(90deg, #ffd43b 0%, #fab005 100%);
}

.ac-progress-fill.warning {
    background: linear-gradient(90deg, #ff922b 0%, #fd7e14 100%);
}

.ac-progress-fill.danger {
    background: linear-gradient(90deg, #ff6b6b 0%, #fa5252 100%);
}

.ac-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.ac-status-badge.present {
    background: #d3f9d8;
    color: #2f9e44;
}

.ac-status-badge.absent {
    background: #ffe0e0;
    color: #c92a2a;
}

.ac-card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Loading State */
.ac-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.ac-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.ac-empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ac-empty-state-text {
    font-size: 16px;
}

/* Alert Messages */
.ac-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.ac-alert.show {
    display: block;
    animation: slideInDown 0.3s ease;
}

.ac-alert-success {
    background: #d3f9d8;
    color: #2f9e44;
    border-left: 4px solid #51cf66;
}

.ac-alert-error {
    background: #ffe0e0;
    color: #c92a2a;
    border-left: 4px solid #ff6b6b;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ac-container {
        margin: 0;
        border-radius: 0;
    }
    
    .ac-header {
        padding: 30px 20px;
    }
    
    .ac-header h1 {
        font-size: 24px;
    }
    
    .ac-form-section,
    .ac-records-section {
        padding: 25px 20px;
    }
    
    .ac-form-row {
        grid-template-columns: 1fr;
    }
    
    .ac-records-container {
        grid-template-columns: 1fr;
    }
    
    .ac-form-section h2,
    .ac-records-section h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .attendance-calculator-wrapper {
        padding: 20px 0;
    }
    
    .ac-header {
        padding: 25px 15px;
    }
    
    .ac-header h1 {
        font-size: 20px;
    }
    
    .ac-header p {
        font-size: 14px;
    }
    
    .ac-form-section,
    .ac-records-section {
        padding: 20px 15px;
    }
    
    .ac-btn {
        width: 100%;
        align-self: stretch;
    }
}
