/**
 * Component Styles
 * Reusable UI Components
 */

/* Buttons - Tailwind Compatible */
.btn-glass {
    @apply px-6 py-2.5 bg-[rgba(30,30,50,0.7)] backdrop-blur-[10px] border border-[rgba(255,255,255,0.1)] text-white rounded-lg font-medium transition-all duration-300 shadow-[0_2px_10px_rgba(0,0,0,0.3)];
}

.btn-glass:hover {
    @apply bg-white/15 -translate-y-0.5 shadow-[0_4px_20px_rgba(0,0,0,0.4)] text-white;
}

.btn-primary-glass {
    @apply px-6 py-2.5 bg-gradient-to-br from-white/20 to-white/10 border border-[rgba(255,255,255,0.1)] text-white rounded-lg font-medium transition-all duration-300;
}

.btn-primary-glass:hover {
    @apply bg-gradient-to-br from-white/30 to-white/20 text-white;
}

.btn-danger-glass {
    @apply px-6 py-2.5 bg-[rgba(255,107,107,0.2)] border border-[rgba(255,107,107,0.4)] text-[#ffebee] rounded-lg font-medium transition-all duration-300;
}

.btn-danger-glass:hover {
    @apply bg-[rgba(255,107,107,0.3)] text-[#ffebee];
}

/* Cards - Tailwind Compatible */
.card-glass,
.glass-card {
    @apply bg-[rgba(20,20,35,0.85)] backdrop-blur-[10px] border border-[rgba(255,255,255,0.15)] rounded-[15px] shadow-[0_4px_20px_rgba(0,0,0,0.4)] transition-all duration-300 text-white;
}

.card-glass:hover,
.glass-card:hover {
    @apply -translate-y-1 shadow-[0_10px_40px_rgba(0,0,0,0.5)];
}

.card-header-glass {
    background: rgba(30, 30, 50, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.card-body-glass {
    padding: 1.5rem;
}

/* Forms */
.form-control-glass,
input.form-control-glass,
textarea.form-control-glass,
select.form-control-glass {
    background: rgba(30, 30, 50, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px;
    color: #ffffff !important;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: text !important;
}

.form-control-glass::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

.form-control-glass:focus,
.form-control-glass:active,
.form-control-glass:hover {
    background: rgba(40, 40, 60, 1) !important;
    border-color: rgba(100, 150, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(100, 150, 255, 0.3) !important;
    color: #ffffff !important;
    outline: none !important;
    opacity: 1 !important;
}

.form-control-glass:disabled,
.form-control-glass[readonly] {
    background: rgba(20, 20, 30, 0.6) !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Badges */
.badge-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Alerts */
.alert-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-success-glass {
    background: rgba(81, 207, 102, 0.2);
    border-color: rgba(81, 207, 102, 0.4);
    color: #e8f5e9;
}

.alert-danger-glass {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
    color: #ffebee;
}

.alert-warning-glass {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
    color: #fff8e1;
}

.alert-info-glass {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.4);
    color: #e3f2fd;
}

/* Inline Editing */
.edit-field {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: var(--transition);
    display: inline-block;
    min-width: 100px;
}

.edit-field:hover {
    background: rgba(40, 40, 60, 0.6);
}

.edit-input {
    background: rgba(30, 30, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #ffffff;
    padding: 0.5rem;
    width: 100%;
    font-size: inherit;
    display: none;
}

.edit-input:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.5);
    background: rgba(40, 40, 60, 0.95);
    color: #ffffff;
}

/* Loading Spinner */
.spinner-glass {
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Payment Info Card */
.payment-info {
    background: rgba(20, 20, 35, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

.payment-info h5 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.payment-info ul {
    list-style: none;
    padding: 0;
}

.payment-info li {
    padding: 0.5rem 0;
    color: #e8e8e8;
}

.payment-info a {
    color: #ffffff;
    text-decoration: underline;
    transition: var(--transition);
}

.payment-info a:hover {
    color: rgba(150, 200, 255, 1);
}

/* Modals - Bootstrap 5 Fix */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    z-index: 1055;
    position: relative;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal.show .modal-dialog {
    pointer-events: none;
}

.modal-content {
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
}

.modal.show .modal-content {
    pointer-events: auto !important;
}

.modal.show .modal-content * {
    pointer-events: auto !important;
}

.modal-content {
    background: rgba(20, 20, 35, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    position: relative;
    z-index: 1055;
    pointer-events: auto !important;
}

.modal-content * {
    pointer-events: auto;
}

.modal-content input,
.modal-content textarea,
.modal-content select,
.modal-content button,
.modal-content label,
.modal-content .form-control-glass,
.modal-content .form-control {
    pointer-events: auto !important;
    position: relative;
    z-index: 10 !important;
    opacity: 1 !important;
    cursor: text !important;
    background-color: rgba(30, 30, 50, 0.9) !important;
    color: #ffffff !important;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    pointer-events: auto !important;
    z-index: 11 !important;
    background-color: rgba(40, 40, 60, 1) !important;
    color: #ffffff !important;
}

.modal-content button {
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Modal CSS moved to modal-fix.css to avoid conflicts */

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
    color: #e0e0e0;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.btn-close:hover {
    opacity: 1 !important;
    filter: invert(1) grayscale(100%) brightness(250%) !important;
}

/* Modal close buttons - ensure they're always visible and clickable */
.modal-content .btn-close,
.modal.show .modal-content .btn-close {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1058 !important;
    position: relative !important;
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

.modal-content .btn-close:hover,
.modal.show .modal-content .btn-close:hover {
    opacity: 1 !important;
    filter: invert(1) grayscale(100%) brightness(250%) !important;
}

.modal-content .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-content small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Responsive */
@media (max-width: 768px) {
    .card-body-glass {
        padding: 1rem;
    }
    
    .payment-info {
        padding: 1.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

