/**
 * OneSchoon My Account Global Styles
 *
 * Global styles for all my account functionality
 */

/* Global Dashboard Styles */
.company-admin-dashboard,
.company-user-dashboard,
.default-dashboard {
    max-width: 800px;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #666;
    margin-bottom: 0;
}

.dashboard-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.dashboard-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.dashboard-section ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.dashboard-section li {
    margin-bottom: 0.5rem;
}

/* Global Form Styles */
.oneschoon-form {
}

.oneschoon-form .form-section {
    margin-bottom: 2rem;
}

.oneschoon-form .form-section:last-of-type {
    border-bottom: none;
}

.oneschoon-form .form-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2em;
    color: #333;
}

/* Form Row Layouts */
.oneschoon-form .form-row-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.oneschoon-form .form-row-group .form-row {
    flex: 1;
}

.oneschoon-form .form-row-group .form-row-1 {
    flex: 1;
}

.oneschoon-form .form-row-group .form-row-2 {
    flex: 2;
}

.oneschoon-form .form-row {
    margin-bottom: 1rem;
}

/* Form Elements */
.oneschoon-form .form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.oneschoon-form .form-row input,
.oneschoon-form .form-row select,
.oneschoon-form .form-row textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.oneschoon-form .form-row input:focus,
.oneschoon-form .form-row select:focus,
.oneschoon-form .form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Required Field Indicator */
.oneschoon-form .form-row input[required] + label::after,
.oneschoon-form .form-row label:has(+ input[required])::after {
    content: " *";
    color: #d63384;
}

/* Submit Buttons */
.oneschoon-form button[type="submit"] {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.oneschoon-form button[type="submit"]:hover {
    background-color: #005a87;
}

.oneschoon-form button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Status Messages */
.oneschoon-status-info {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #e8f4f8;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.oneschoon-status-warning {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.oneschoon-status-error {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .oneschoon-form .form-row-group {
        flex-direction: column;
        gap: 0;
    }

    .oneschoon-form .form-row-group .form-row {
        flex: none;
    }

    .oneschoon-form,
    .company-admin-dashboard,
    .company-user-dashboard,
    .default-dashboard {
        max-width: none;
    }
}

/* 5. Modal Close - Minimal but accessible */
.oneschoon-modal__close {
    background: transparent !important;
    border: none !important;
    color: #5d5d5d !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    padding: 0.25rem !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
    line-height: 1 !important;
}

.oneschoon-modal__close:hover {
    background: rgba(93, 93, 93, 0.1) !important;
    color: #343a40 !important;
}

/* Spinner styles */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.text-success {
    color: #28a745 !important;
}

.text-muted {
    color: #6c757d !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Loading state styling */
.oneschoon-loading-state {
    padding: 2rem;
}

.oneschoon-loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color, #007cba);
}

.oneschoon-loading-state p {
    color: #666;
    margin-top: 1rem;
    font-weight: 500;
}

/* Mobile Warning - Desktop Required Message (shared across my account pages) */
.oneschoon-mobile-warning {
    text-align: center;
}

.oneschoon-mobile-warning__content {
    background: linear-gradient(135deg, rgba(147, 25, 128, 0.05), rgba(230, 0, 126, 0.05));
    border-radius: 16px;
    border: 2px solid rgba(147, 25, 128, 0.15);
    padding: 2.5rem 2rem;
}

.oneschoon-mobile-warning__icon {
    margin-bottom: 1.5rem;
    color: #931980;
    font-size: 4rem;
    opacity: 0.8;
}

.oneschoon-mobile-warning__title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #931980;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.oneschoon-mobile-warning__description {
    font-size: 1.1rem;
    color: #5d5d5d;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Empty State - Shared across my account pages */
.oneschoon-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(147, 25, 128, 0.03), rgba(230, 0, 126, 0.03));
    border-radius: 16px;
    border: 2px dashed rgba(147, 25, 128, 0.2);
    margin: 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.oneschoon-empty-state__icon {
    margin-bottom: 1.5rem;
    color: #931980;
    opacity: 0.8;
    font-size: 3rem;
}

.oneschoon-empty-state__content {
    max-width: 480px;
    margin: 0 auto;
}

.oneschoon-empty-state__title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #931980;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.oneschoon-empty-state__description {
    font-size: 1.1rem;
    color: #5d5d5d;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.oneschoon-empty-state__button {
    background: linear-gradient(135deg, #931980, #e6007e) !important;
    color: #fff !important;
    border: none !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(147, 25, 128, 0.3) !important;
}

.oneschoon-empty-state__button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(147, 25, 128, 0.4) !important;
    background: linear-gradient(135deg, #7b0e6f, #c50068) !important;
}

.oneschoon-empty-state__tips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.oneschoon-empty-state__tip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6f6e6e;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(147, 25, 128, 0.1);
}

.oneschoon-empty-state__tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Badge Styling - Shared across my account pages */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.badge-primary {
    color: #fff;
    background-color: #931980;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

.badge-success {
    color: #fff;
    background-color: #22c55e;
}

.badge-info {
    color: #fff;
    background-color: #3b82f6;
}

.badge-warning {
    color: #92400e;
    background-color: #fbbf24;
}

.badge-danger {
    color: #fff;
    background-color: #ef4444;
}

.badge-light {
    color: #374151;
    background-color: #f3f4f6;
}

.badge-dark {
    color: #fff;
    background-color: #1f2937;
}

/* Budget Dashboard Styling */
.budget-overview {
    margin-top: 1.5rem;
}

.budget-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .budget-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.budget-card {
    background: rgba(0, 0, 0, 0.035);
    border-radius: 12px;
    border: 2px solid rgba(147, 25, 128, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
}

.budget-card:hover {
    border-color: rgba(147, 25, 128, 0.2);
    box-shadow: 0 4px 12px rgba(147, 25, 128, 0.1);
}

.budget-card-header {
    background: linear-gradient(135deg, rgba(147, 25, 128, 0.05), rgba(230, 0, 126, 0.05));
    border-bottom: 1px solid rgba(147, 25, 128, 0.1);
    padding: 1rem 1.25rem;
}

.budget-card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #931980;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.budget-card-content {
    padding: 1.5rem 1.25rem;
}

.budget-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #931980;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.budget-amount.text-muted {
    color: #6c757d !important;
    font-size: 1.5rem;
}

.budget-description {
    color: #6f6e6e;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.budget-usage {
    margin-bottom: 1rem;
}

.budget-usage-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.budget-usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.budget-usage-progress[style*="width: 7"],
.budget-usage-progress[style*="width: 8"],
.budget-usage-progress[style*="width: 9"] {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.budget-usage-progress[style*="width: 100%"] {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.budget-usage-text {
    font-size: 0.85rem;
    color: #6f6e6e;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-actions .btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions .btn-primary {
    background: linear-gradient(135deg, #931980, #e6007e);
    border: none;
    color: white;
}

.quick-actions .btn-primary:hover {
    background: linear-gradient(135deg, #7b0e6f, #c50068);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 25, 128, 0.3);
}

.quick-actions .btn-outline-primary {
    background: transparent;
    border: 2px solid #931980;
    color: #931980;
}

.quick-actions .btn-outline-primary:hover {
    background: #931980;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 25, 128, 0.3);
}

.quick-actions .btn-outline-success {
    background: transparent;
    border: 2px solid #22c55e;
    color: #22c55e;
}

.quick-actions .btn-outline-success:hover {
    background: #22c55e;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .budget-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .budget-amount {
        font-size: 1.75rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
