/* Materialize CSS Overrides for Cœur Astral */
/* This file preserves the existing design while enabling Materialize components */

/* Reset Materialize's default body styling */
body {
    font-family: 'Montserrat', sans-serif !important;
    background-color: inherit;
}

/* Override Materialize container max-width to allow full-width pages */
.profil-edition .container {
    max-width: none !important;
    width: 100% !important;
}

/* Preserve existing button styles */
.btn-astral,
.btn-astral:hover,
.btn-astral:focus {
    background-color: var(--primary-color, #FF6B6B) !important;
    color: white !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Modal specific overrides */
.modal {
    background-color: rgba(17, 17, 36, 0.98) !important;
    border-radius: 16px !important;
}

.modal .modal-content {
    color: #fff !important;
    padding: 24px !important;
}

/* Preserve existing form styles */
input[type="text"]:not(.browser-default),
input[type="email"]:not(.browser-default),
input[type="password"]:not(.browser-default),
textarea:not(.browser-default) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: inherit !important;
}

/* Toast notifications styling */
.toast {
    background-color: rgba(117, 14, 181, 0.95) !important;
    border-radius: 8px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Tooltip styling */
.material-tooltip {
    background-color: rgba(117, 14, 181, 0.95) !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
}

/* Fix modal overlay */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Preserve existing card styles */
.card-panel {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Cosmic advice modal specific styles */
.cosmic-advice-modal {
    max-width: 800px !important;
}

.cosmic-advice-modal .modal-content {
    background-color: transparent !important;
}

/* Fix any typography issues */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
}

/* Preserve link colors */
a {
    color: inherit;
}

/* Fix navigation if affected */
nav {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Preserve existing form field focus states */
input[type="text"]:focus:not(.browser-default),
input[type="email"]:focus:not(.browser-default),
input[type="password"]:focus:not(.browser-default),
textarea:focus:not(.browser-default) {
    border-bottom: 2px solid var(--primary-color, #750EB5) !important;
    box-shadow: 0 1px 0 0 var(--primary-color, #750EB5) !important;
}

/* Fix select dropdowns if used */
.select-wrapper input.select-dropdown {
    color: inherit !important;
    border-bottom-color: rgba(255, 255, 255, 0.3) !important;
}

/* Ensure Material Icons work properly */
.material-icons {
    vertical-align: middle;
    line-height: inherit;
}

/* ===== Profile Edit Form Visibility Improvements ===== */
/* Override Materialize styles for better form visibility */

/* Improve input and textarea visibility */
.profil-edition form input[type="text"]:not(.browser-default),
.profil-edition form input[type="email"]:not(.browser-default),
.profil-edition form input[type="password"]:not(.browser-default),
.profil-edition form input[type="datetime-local"]:not(.browser-default),
.profil-edition form textarea:not(.browser-default) {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 40px !important;
    padding: 1rem 2rem !important;
    color: rgba(255, 255, 255, .9) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.profil-edition form textarea:not(.browser-default) {
    border-radius: 20px !important;
    padding: 1rem !important;
}

/* Improve focus states */
.profil-edition form input:focus:not(.browser-default),
.profil-edition form textarea:focus:not(.browser-default) {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 2px solid #873aac !important;
    box-shadow: none !important;
}

/* Improve select dropdown visibility */
.profil-edition form select {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, .9) !important;
    border: 2px solid rgba(255, 255, 255, .8) !important;
    border-radius: 10px !important;
    padding: 0.5rem 1rem !important;
}

/* Radio buttons and checkboxes styling */
.profil-edition form input[type="radio"],
.profil-edition form input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    accent-color: #873aac !important;
    border: 2px solid rgba(255, 255, 255, .9) !important;
    opacity: 1 !important;
    position: relative !important;
}

/* Radio and checkbox container */
.profil-edition #id_gender div,
.profil-edition #id_looking_for div {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
    padding: 0.5rem 0 !important;
}

.profil-edition #id_gender label,
.profil-edition #id_looking_for label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    color: rgba(255, 255, 255, .9) !important;
}
