/* Custom styles for BJJ Training Planner */

/* --- Custom fix for Home/Main App button visibility (flowchart.html) --- */
.bg-bjj-blue {
  background-color: #1E40AF !important;
}
.text-bjj-blue {
  color: #1E40AF !important;
}
.hover\:bg-blue-700:hover {
  background-color: #1D4ED8 !important;
}

/* Tab styles */
.tab-button.active {
    color: #1E40AF;
    border-bottom-color: #1E40AF;
}

.tab-button:hover {
    color: #374151;
}


/* Technique card styles */
.technique-card {
    transition: all 0.2s ease-in-out;
}

.technique-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Difficulty indicators */
.difficulty-beginner { color: #059669; }
.difficulty-intermediate { color: #D97706; }
.difficulty-advanced { color: #DC2626; }

/* Progress indicators */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.2s ease-out;
}

.modal-exit {
    animation: modalExit 0.2s ease-in;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .technique-card {
        margin-bottom: 1rem;
    }
}

/* Focus styles for accessibility */
.focus\:ring-bjj:focus {
    --tw-ring-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3);
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1E40AF;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Message notification styles */
.message-info {
    background-color: #EFF6FF;
    border-color: #1E40AF;
    color: #1E3A8A;
}

.message-success {
    background-color: #DCFCE7;
    border-color: #16A34A;
    color: #15803D;
}

.message-error {
    background-color: #FEE2E2;
    border-color: #DC2626;
    color: #B91C1C;
}

.message-warning {
    background-color: #FEF3C7;
    border-color: #D97706;
    color: #92400E;
}

/* Custom form elements */
.form-input {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Training plan timeline */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #1E40AF;
    border-radius: 50%;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 1rem;
    bottom: -1rem;
    width: 1px;
    background-color: #E5E7EB;
}

/* Save Status Indicator Styles */
.save-status {
    transition: all 0.3s ease-in-out;
    border: 1px solid transparent;
}

.save-status.saved {
    background-color: #DCFCE7;
    border-color: #16A34A;
    color: #15803D;
}

.save-status.saving {
    background-color: #FEF3C7;
    border-color: #D97706;
    color: #92400E;
}

.save-status.error {
    background-color: #FEE2E2;
    border-color: #DC2626;
    color: #B91C1C;
}

.save-status.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

.save-status:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.save-status .save-icon {
    animation: none;
}

.save-status.saving .save-icon {
    animation: pulse 1.5s infinite;
}

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

/* Button disabled state for export */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:disabled:hover {
    background-color: inherit !important;
}

/* Footer styles */
.footer {
    margin-top: auto;
}

#appVersion, #visitCounter {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

#visitCounter {
    min-width: 3rem;
    text-align: center;
}

/* Ensure footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}
