/* ================================================
   COMMON STYLES - Replacement for MudBlazor Components
   ================================================ */

/* ================================================
   MATERIAL DESIGN ICONS (SVG)
   ================================================ */
.material-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    fill: currentColor;
}

.material-icon-small {
    width: 18px;
    height: 18px;
}

.material-icon-large {
    width: 36px;
    height: 36px;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: none;
    color: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-filled {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    color: white;
}

.btn-filled:hover:not(:disabled) {
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    transform: translateY(-2px);
}

.btn-outlined {
    background: transparent;
    border: 1.5px solid currentColor;
}

.btn-outlined:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn-text {
    background: transparent;
    padding: 0.5rem 1rem;
}

.btn-text:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    min-width: 40px;
    min-height: 40px;
}

.btn-large {
    height: 56px;
    padding: 0 2rem;
    font-size: 1.1rem;
}

.btn-small {
    height: 32px;
    padding: 0 0.75rem;
    font-size: 0.875rem;
}

.btn-fullwidth {
    width: 100%;
}

/* ================================================
   FORM INPUTS
   ================================================ */
.form-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: transparent;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:hover {
    border-color: rgba(255, 107, 157, 0.5);
}

.form-input:focus {
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-label {
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-error {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Input with icon */
.form-input-container {
    position: relative;
}

.form-input-icon-end {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
}

.form-input-icon-end:hover {
    color: #ff6b9d;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    accent-color: #ff6b9d;
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
}

/* ================================================
   SPINNER / LOADING
   ================================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

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

/* ================================================
   DIVIDER
   ================================================ */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    position: relative;
}

.divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.08);
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ================================================
   LINK
   ================================================ */
.link {
    color: #ff6b9d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #4ecdc4;
    text-decoration: underline;
}

/* ================================================
   MODAL / DIALOG
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ================================================
   SNACKBAR / TOAST NOTIFICATIONS
   ================================================ */
.snackbar-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.snackbar {
    background: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 500px;
    pointer-events: all;
    animation: slideUpFade 0.3s ease;
}

.snackbar-success {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.snackbar-error {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.snackbar-warning {
    background: linear-gradient(135deg, #ffa726, #ff9800);
}

.snackbar-info {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
}

.snackbar-message {
    flex: 1;
    font-size: 0.9375rem;
}

.snackbar-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.snackbar-close:hover {
    opacity: 1;
}

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

/* ================================================
   EXPANSION PANEL / ACCORDION
   ================================================ */
.expansion-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.expansion-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
    user-select: none;
}

.expansion-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.expansion-header-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.expansion-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.expansion-icon.expanded {
    transform: rotate(180deg);
}

.expansion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.expansion-content.expanded {
    max-height: 1000px;
}

.expansion-body {
    padding: 0 1.5rem 1rem;
}

/* ================================================
   CARD / PAPER
   ================================================ */
.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */
.text-h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-h3 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

.text-h4 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.text-h5 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-h6 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-subtitle1 {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.5;
}

.text-subtitle2 {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.text-body1 {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.text-body2 {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.text-caption {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .snackbar-container {
        left: 1rem;
        right: 1rem;
        transform: none;
    }

    .snackbar {
        min-width: auto;
    }

    .modal-content {
        width: 95%;
    }
}
