/* Goals Button */
.goals-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #37352f;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 12px auto 0 auto;
    max-width: 200px;
}

.goals-button:hover {
    background: #f0f0f0;
    border-color: #d1d1d1;
}

.goals-button .material-icons {
    font-size: 18px;
}

.goals-button-text {
    font-weight: 500;
}

/* Goals Modal */
.goals-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.goals-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.goals-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.goals-modal-header {
    display: flex;
    font-size: 0.9rem;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #e3e2e0;
}

.goals-modal-header h3 {
    font-weight: 600;
    color: #37352f;
}

.goals-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    transition: color 0.2s ease;
}

.goals-modal-close:hover {
    color: #37352f;
}

.goals-helper-text {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.goals-modal-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.goals-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

/* Updated styles from goalStyles.css overrides */

.goal-entry {
    padding: 10px;
    border-bottom: 1px solid #e3e2e0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

/* Removed goal-header-row and goal-settings-row styles as they are no longer used */

.goal-category-select {
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    color: #37352f;
    border: 1px solid #ddd;
    /* max-width: 140px; */
    flex: 1;
    /* Allow growing */
    min-width: 120px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.goal-remove-btn {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    margin-left: auto;
    /* Push to the right if there's space, or naturally flow */
}

.goal-remove-btn .material-icons {
    font-size: 18px;
}

.goal-duration-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-input-label {
    font-size: 11px;
    color: #888;
}

.duration-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-duration-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.goal-hours-input,
.goal-minutes-input {
    width: 3.5ch;
    padding: 4px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: transparent;
    color: #37352f;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.duration-unit {
    display: none;
}

.goal-duration-separator {
    color: #888;
    font-weight: bold;
    margin: 0 2px;
    padding-bottom: 8px;
}

.goal-schedule-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-toggles {
    display: flex;
    gap: 8px;
}

.schedule-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.day-label {
    font-size: 10px;
    font-weight: bold;
    color: #888;
}

.schedule-checkbox {
    margin: 0;
}

/* Add Goals Button in List */
.goals-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f7f7f7;
    border: 1px dashed #d1d1d1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6b6b6b;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
}

.goals-add-btn:hover {
    background: #efefef;
    color: #37352f;
    border-color: #37352f;
}

.goals-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 12px;
    border-top: 1px solid #e3e2e0;
}

.goals-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.goals-btn-secondary {
    background: #f0f0f0;
    color: #37352f;
}

.goals-btn-secondary:hover {
    background: #e4e4e4;
}

.goals-btn-primary {
    background: #37352f;
    color: white;
}

.goals-btn-primary:hover {
    background: #2d2b28;
}

.goal-category-select:focus,
.goal-hours-input:focus,
.goal-minutes-input:focus {
    outline: none;
    border-color: #37352f;
}

/* Empty Goals State */
.empty-goals-state {
    /* Base styles provided by .chart-empty-state-card */
    padding: 24px;
    color: #666;
}

.empty-goals-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 8px;
}

.empty-goals-body {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 16px;
    max-width: 280px;
    line-height: 1.5;
}

.empty-goals-cta {
    background: #44bd32;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.empty-goals-cta:hover {
    background: #2d2b28;
}

.empty-goals-cta .material-icons {
    font-size: 18px;
}