/* Custom styles for Fairy2Fairy Tarot App */

/* CSS Variables */
:root {
    --navbar-color: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    --accent-color: #ff6b6b;
    --base-font-size: 1rem;
}

/* Global styles */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Navigation customization */
.navbar.is-primary {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand .navbar-item {
    font-weight: bold;
    font-size: 1.2em;
}

.navbar-brand .navbar-item img.site-logo {
    height: 2.6rem;
    width: 2.6rem;
    max-height: none !important;
    object-fit: contain;
    padding: 0.2rem;
    background: #fff8f5;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(40, 20, 80, 0.28);
}

.news-body,
.news-excerpt {
    white-space: pre-wrap;
}

.news-banner {
    margin-bottom: 1.5rem;
}

/* Hero section */
.hero.is-primary {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.hero.is-primary .title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-fairy {
    display: inline-block;
    width: min(100%, 26rem);
    height: auto;
    max-height: 26rem;
    object-fit: contain;
    filter: drop-shadow(0 14px 28px rgba(40, 20, 80, 0.4));
}

/* Card styling */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image img {
    transition: transform 0.3s ease-in-out;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* Tarot card specific styles */
.tarot-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tarot-card.reversed img {
    transform: rotate(180deg);
}

.tarot-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tarot-card:hover .card-overlay {
    opacity: 1;
}

/* Form styling */
.field .label {
    font-weight: 600;
    color: #363636;
}

/* Tarot Playground Feature Highlight */
.playground-highlight {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

.playground-highlight .title {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.playground-highlight .tags .tag {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Playground Access Tags */
.tag.is-success.is-medium {
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.tag.is-light.is-medium {
    font-weight: 600;
    padding: 0.75rem 1rem;
    color: #7a7a7a;
}

.input, .textarea {
    border-radius: 8px;
    border: 2px solid #dbdbdb;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input:focus, .textarea:focus {
    border-color: #5a67d8;
    box-shadow: 0 0 0 0.125em rgba(102, 126, 234, 0.25);
}

/* Button customization - Removed conflicting rules to allow theme system to handle styling */

/* Calendar customization */
.fc-event {
    border-radius: 5px;
    border: none;
    padding: 2px 5px;
}

.fc-event:hover {
    opacity: 0.8;
}

.fc-toolbar-title {
    font-size: 1.5em !important;
    font-weight: bold;
}

/* DataTable customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 1rem;
}

/* Notification styling */
.notification {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.notification.is-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.notification.is-primary {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
}

.notification.is-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.notification.is-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.notification.is-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

/* Box styling */
.box {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Footer styling */
.footer {
    background: #f5f5f5;
    border-top: 1px solid #dbdbdb;
    margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero .title {
        font-size: 2rem !important;
    }
    
    .hero .subtitle {
        font-size: 1.1rem !important;
    }

    .hero-fairy {
        max-height: 18rem;
        margin-top: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5a67d8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tag styling */
.tag.is-light {
    background: #f5f5f5;
    color: #4a4a4a;
    border: 1px solid #dbdbdb;
}

.tag.is-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Modal customization */
.modal-card {
    border-radius: 15px;
    overflow: hidden;
}

.modal-card-head {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
}

/* Table styling */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
    background: #f5f5f5;
    border-bottom: 2px solid #dbdbdb;
    font-weight: 600;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #5a67d8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* "More" menu the navbar builds when its links do not fit (see base.html) */
.navbar-start { flex-wrap: nowrap; }
.nav-more .navbar-dropdown { max-height: calc(100vh - 5rem); overflow-y: auto; }
