/* Custom styles for the Dilemma Generator - Wellbased House Style */

:root {
    /* Wellbased Brand Colors */
    --wellbased-white: #ffffff;
    --wellbased-yellow: #fadf77;
    --wellbased-orange: #ff783d;
    --wellbased-pink: #ebb6d2;
    --wellbased-purple: #716198;
    --wellbased-dark-blue: #32255b;
    --wellbased-darkest: #160e36;
    --wellbased-teal: #52a3a7;
    --wellbased-blue: #417cb8;
    
    /* Override Bootstrap variables with Wellbased colors */
    --bs-primary: var(--wellbased-blue);
    --bs-primary-rgb: 65, 124, 184;
    --bs-success: var(--wellbased-teal);
    --bs-warning: var(--wellbased-yellow);
    --bs-danger: var(--wellbased-orange);
    --bs-info: var(--wellbased-purple);
}

/* Main layout */
body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Header styling */
header h1 {
    font-weight: 600;
}

/* Wellbased Logo Container */
.wellbased-logo-container {
    display: inline-flex;
    align-items: center;
    font-size: 48px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.wellbased-text {
    color: var(--wellbased-darkest);
    line-height: 1;
}

.logo-o-symbol {
    position: relative;
    width: 42px;
    height: 48px;
    margin: 0 1px;
    display: inline-block;
    vertical-align: baseline;
}

.symbol-yellow {
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: var(--wellbased-yellow);
    border-radius: 50%;
    top: 2px;
    left: 10px;
}

.symbol-orange {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--wellbased-orange);
    border-radius: 50%;
    top: 8px;
    right: 2px;
}

.symbol-pink {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--wellbased-pink);
    border-radius: 50%;
    bottom: 8px;
    left: 0;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Form styling */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Dilemma display - Large and centered for classroom visibility */
.dilemma-content {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 40px 30px;
    margin: 30px 0;
    border-left: 6px solid var(--wellbased-purple);
    text-align: center;
    box-shadow: 0 4px 20px rgba(113, 97, 152, 0.15);
}

.dilemma-content p {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    font-weight: 500;
    color: var(--wellbased-dark-blue);
    margin-bottom: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Dilemma edit mode styling */
#dilemmaEditor {
    border: 2px solid var(--wellbased-purple);
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
    padding: 12px;
    resize: vertical;
    min-height: 100px;
}

#dilemmaEditor:focus {
    outline: none;
    border-color: var(--wellbased-dark-blue);
    box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
}

#editMode .btn {
    font-size: 0.875rem;
}

/* Edit button positioning */
#editBtn {
    margin-top: -5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#editBtn:hover {
    opacity: 1;
}

/* Fullscreen mode styling */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.fullscreen-dilemma {
    font-size: 2.5rem !important;
    line-height: 1.5 !important;
    font-weight: 600;
    color: var(--wellbased-dark-blue);
    text-align: center;
    max-width: 1000px;
    margin-bottom: 40px;
}

.fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--wellbased-purple);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: var(--wellbased-dark-blue);
    transform: scale(1.1);
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    /* Header spacing adjustments */
    header {
        margin-top: 2rem !important;
        padding: 2rem 0 !important;
    }
    
    /* Navigation - force horizontal layout on mobile */
    .container > .d-flex.justify-content-between.align-items-center.pt-3 {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    /* Make logo container align properly */
    .container > .d-flex.justify-content-between.align-items-center.pt-3 > div:first-child {
        display: flex !important;
        align-items: center !important;
    }
    
    /* Make logo smaller on mobile */
    .container > .d-flex.justify-content-between.align-items-center.pt-3 img {
        height: 24px !important;
        vertical-align: middle !important;
    }
    
    /* Make button smaller and align properly on mobile */
    .container > .d-flex.justify-content-between.align-items-center.pt-3 .btn {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Main content */
    .col-lg-8 {
        padding: 0 1rem;
    }
    
    /* Card padding */
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    /* Button group wrapping */
    .d-flex.gap-2.flex-wrap {
        justify-content: center;
    }
    
    .btn-sm {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Mobile responsive AI notice */
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem;
    }
    
    /* Dilemma content mobile adjustments */
    .dilemma-content {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .dilemma-content p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Fullscreen mobile adjustments */
    .fullscreen-overlay {
        padding: 20px;
    }
    
    .fullscreen-dilemma {
        font-size: 1.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 20px;
    }
    
    .fullscreen-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    /* History section mobile */
    .history-card .card-body {
        padding: 1rem 0.75rem;
    }
    
    /* Input field mobile */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 0.5rem;
    }
    
    h1 {
        font-size: 1.8rem !important;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .fullscreen-dilemma {
        font-size: 1.5rem !important;
    }
}

/* Consistent button sizing in history cards */
.history-bekijk-btn {
    min-width: 85px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Button styling */
.btn {
    border-radius: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    padding: 12px 24px;
    font-size: 16px;
}

.btn-primary {
    background: #716198;
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(113, 97, 152, 0.3);
}

.btn-primary:hover {
    background: #8a7cb8;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 20px rgba(138, 124, 184, 0.4);
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary.disabled,
.btn-primary:disabled {
    background: #716198 !important;
    border-color: #716198 !important;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(113, 97, 152, 0.4) !important;
    color: white !important;
}

.btn-primary.btn-lg {
    background: #716198 !important;
    border-color: #716198 !important;
    color: white !important;
}

.btn-outline-primary {
    border: 2px solid #716198;
    color: #716198;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #716198;
    border-color: #716198;
    color: white;
}

.btn-outline-info {
    border: 2px solid #417cb8;
    color: #417cb8;
    background: transparent;
}

.btn-outline-info:hover {
    background: #417cb8;
    border-color: #417cb8;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--wellbased-teal);
    color: var(--wellbased-teal);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--wellbased-teal);
    border-color: var(--wellbased-teal);
    color: white;
}

.btn-outline-danger {
    border: 2px solid #ff783d;
    color: #ff783d;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #ff783d;
    border-color: #ff783d;
    color: white;
}

/* Dilemma content styling */
.dilemma-content {
    background: linear-gradient(135deg, rgba(250, 223, 119, 0.1), rgba(235, 182, 210, 0.1));
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--wellbased-blue);
}

/* History cards */
#historyContainer .card {
    transition: all 0.2s ease;
    background: white;
    border: 1px solid #e9ecef;
}

#historyContainer .card:hover {
    background: #f8f9fa;
    border-color: var(--wellbased-blue);
}

/* Loading animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    header {
        padding: 2rem 0 !important;
    }
}

/* Icon styling */
.feather {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    border: none;
}

/* Footer */
footer {
    border-top: 1px solid var(--bs-border-color);
    margin-top: 3rem !important;
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--bs-gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}
