/*
  MICHELLE PAGE STYLES
  - Commitment cards
  - Search functionality
  - Export buttons
  - Modal and forms
  - Toast notifications
*/

/* 0. BODY & CONTAINER OVERRIDE */
body {
    justify-content: flex-start;
    align-items: stretch;
}

.container {
    padding: 0;
}

/* 0.5. MICHELLE LOGO STYLES */
.michelle-logo {
    height: 3rem;
    width: auto;
}

.michelle-logo .logo-img {
    height: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 1rem;
}

/* 1. COMMITMENT CARDS */
.commitment-card {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-small);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.commitment-header {
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.8rem;
}

.commitment-date {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.commitment-text {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.commitment-text p {
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.commitment-text p:last-child {
    margin-bottom: 0;
}

.commitment-text ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.commitment-text li {
    margin-bottom: 0.6rem;
    position: relative;
}

.commitment-text li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: -1.2rem;
    font-size: 1.2em;
}

.commitment-text li:last-child {
    margin-bottom: 0;
}

.commitment-text .name-link a,
.commitment-text a.name-link {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.commitment-text .name-link a:hover,
.commitment-text a.name-link:hover {
    transform: translateY(-1px);
    text-shadow: 0 0 8px var(--primary);
}

/* 2. COMMITMENT ACTIONS */
.commitment-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    float: right;
}

.commitment-card:hover .commitment-actions {
    opacity: 1;
}

.icon-btn {
    background: none;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-dark);
    color: var(--text-light);
}

.icon-btn.edit-btn:hover {
    color: var(--primary);
}

.icon-btn.delete-btn:hover {
    color: var(--secondary);
}

/* 3. SEARCH CONTAINER */
.search-container {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 50px;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
    transform: translateY(-2px);
}

.search-input:focus ~ .search-icon {
    color: var(--primary);
}

body.dark-mode .search-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 255, 163, 0.15), 0 4px 12px rgba(0, 255, 163, 0.2);
}

body.light-mode .search-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15), 0 4px 12px rgba(0, 102, 204, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* 4. EXPORT BUTTONS */
.export-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.export-btn {
    padding: 0.7rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-small);
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

/* 5. ADD COMMITMENT BUTTON */
.add-commitment-container {
    margin-top: 2rem;
    text-align: center;
}

/* 6. MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--model-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--bg-darker);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 520px;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.light-mode .modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    margin-bottom: 1.8rem;
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background: var(--primary);
    color: var(--bg-darker);
    transform: rotate(90deg);
    border-color: var(--primary);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 7. FORM INPUTS */
.date-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.date-input-group > div {
    flex: 1;
}

.date-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.date-input {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-small);
    padding: 0.75rem;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
    transform: translateY(-2px);
}

body.dark-mode .date-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 255, 163, 0.1);
}

body.light-mode .date-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.note-input {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-small);
    padding: 1.2rem;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 180px;
    resize: vertical;
    transition: all 0.3s ease;
}

.note-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.note-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
}

body.dark-mode .note-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 255, 163, 0.1);
}

body.light-mode .note-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

/* 8. BUTTONS */
.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.control-btn {
    padding: 0.9rem 2rem;
    border: 2px solid transparent;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.control-btn:hover::before {
    width: 300px;
    height: 300px;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: translateY(-1px);
}

.control-btn.start-btn {
    background: var(--primary);
    color: var(--bg-darker);
    font-weight: 700;
    border-color: var(--primary);
}

body.dark-mode .control-btn.start-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 255, 163, 0.4);
}

body.light-mode .control-btn.start-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
}

/* 9. EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 10. TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-darker);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-small);
    padding: 1rem 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 250px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    color: var(--text-main);
    font-size: 0.9rem;
}

.toast-success {
    border-left: 3px solid var(--primary);
}

.toast-error {
    border-left: 3px solid var(--secondary);
}

.toast-warning {
    border-left: 3px solid #ffa500;
}

.toast-info {
    border-left: 3px solid #00bfff;
}

/* 11. MEDIA QUERIES */
@media (max-width: 768px) {
    .michelle-logo {
        height: 50px;
    }
    
    .michelle-logo .logo-img {
        height: 50px;
    }
    
    .commitment-actions {
        opacity: 1;
    }
    
    .modal {
        padding: 1.5rem;
        width: 95%;
    }
    
    .date-input-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .date-input {
        flex: 1;
        min-width: 80px;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .export-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .commitment-text {
        font-size: 0.9rem;
    }
}
