/* Month Card Styles - Simplified Design */

.month-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

/* Month card header */
.month-card-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
    background-color: #f8f9fa;
}

.month-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.month-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.month-year {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Toggle Switch for Month Status */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Unchecked = Open (default state) */
.toggle-slider {
    background-color: #9e9e9e; /* Neutral gray for open/default state */
}

/* Checked = Closed (active state) */
input:checked + .toggle-slider {
    background-color: #e53935; /* Red for closed/restricted state */
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #e53935;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Disabled state */
.toggle-switch.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state */
.toggle-switch.loading .toggle-slider:before {
    animation: pulse 1.5s infinite;
}

/* Skeleton loading animation */
.skeleton-toggle {
    width: 100px;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 24px;
    position: relative;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Month card actions */
.month-card-actions {
    display: flex;
    padding: 0.75rem;
    gap: 0.5rem;
}

/* Action buttons - More button-like design */
.card-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

.card-action:hover {
    background-color: #f1f1f1;
    border-color: #d0d0d0;
}

/* View button */
.card-action.view {
    color: #0277bd;
    background-color: #e3f2fd;
    border-color: #bbdefb;
}

.card-action.view:hover {
    background-color: #bbdefb;
}

/* Insert button */
.card-action.chat {
    color: #2e7d32;
    background-color: #e8f5e9;
    border-color: #c8e6c9;
}

.card-action.chat:hover {
    background-color: #c8e6c9;
}

/* Export button */
.card-action.export {
    color: #616161;
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

.card-action.export:hover {
    background-color: #e0e0e0;
}

/* Delete button */
.card-action.delete {
    color: #c62828;
    background-color: #ffebee;
    border-color: #ffcdd2;
}

.card-action.delete:hover {
    background-color: #ffcdd2;
}

/* Close button */
.card-action.close {
    color: #c62828;
    background-color: #ffebee;
    border-color: #ffcdd2;
}

.card-action.close:hover {
    background-color: #ffcdd2;
}

/* Reopen button */
.card-action.reopen {
    color: #ff8f00;
    background-color: #fff8e1;
    border-color: #ffecb3;
}

.card-action.reopen:hover {
    background-color: #ffecb3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .month-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .month-status {
        align-self: flex-start;
    }
    
    .month-card-actions {
        flex-wrap: wrap;
    }
    
    .card-action {
        flex-basis: calc(50% - 0.25rem);
    }
    
    .card-action.export,
    .card-action.delete {
        flex-basis: 100%;
        margin-top: 0.5rem;
    }
    
    .card-action.export {
        order: 3;
    }
    
    .card-action.delete {
        order: 4;
    }
}
