/* Claymorphism Theme - Professional Survey Editor */
:root {
    --navy-blue: #001f3f;
    --navy-blue-light: #003d66;
    --navy-blue-lighter: #006699;
    --navy-blue-dark: #000b1a;
    
    /* Claymorphism Colors */
    --clay-light: #f5f7fa;
    --clay-mid: #e8ecf1;
    --clay-dark: #d0dce8;
}

/* General Styles */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    min-height: 100vh;
}

/* Claymorphism Shadows */
.clay-shadow-sm {
    box-shadow: 0.5px 1px 2.5px rgba(0, 0, 0, 0.05), 
                1px 2px 5px rgba(0, 0, 0, 0.08);
}

.clay-shadow {
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.06),
                2px 4px 8px rgba(0, 0, 0, 0.08),
                4px 8px 16px rgba(0, 0, 0, 0.1);
}

.clay-shadow-lg {
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.08),
                4px 8px 16px rgba(0, 0, 0, 0.1),
                8px 16px 32px rgba(0, 0, 0, 0.12);
}

/* Navbar */
.bg-navy {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Buttons */
.btn-navy {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    border: none;
    color: white;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 2px 4px 8px rgba(0, 31, 63, 0.2);
    font-weight: 500;
}

.btn-navy:hover {
    background: linear-gradient(135deg, #003d66 0%, #006699 100%);
    box-shadow: 4px 8px 16px rgba(0, 31, 63, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-navy:active {
    transform: translateY(0);
    box-shadow: 1px 2px 4px rgba(0, 31, 63, 0.15);
}

.btn-outline-navy {
    color: var(--navy-blue);
    border: 2px solid var(--navy-blue);
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-navy:hover {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    border-color: var(--navy-blue);
    color: white;
    box-shadow: 2px 4px 8px rgba(0, 31, 63, 0.2);
}

.btn-light {
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy-blue);
    font-weight: 500;
    border: none;
    border-radius: 10px;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.btn-light:hover {
    background: white;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 2px 4px 8px rgba(40, 167, 69, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success:hover {
    box-shadow: 4px 8px 16px rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 2px 4px 8px rgba(220, 53, 69, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    box-shadow: 4px 8px 16px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 2px 4px 8px rgba(108, 117, 125, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    box-shadow: 4px 8px 16px rgba(108, 117, 125, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    border-radius: 8px;
}

/* Disabled Button Styling */
button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}

button:disabled:hover,
.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-outline-secondary:disabled {
    color: #6c757d;
    border-color: #6c757d;
    background: transparent;
    opacity: 0.5;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
}

.card:hover {
    box-shadow: 4px 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.border-navy {
    border: 2px solid var(--navy-blue) !important;
}

.card-header {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%) !important;
    color: white;
    border-radius: 14px 14px 0 0 !important;
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-body {
    padding: 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid var(--clay-mid);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--navy-blue);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(0, 31, 63, 0.15),
                inset 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
}

.form-control-lg {
    font-size: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
}

.form-label {
    font-weight: 600;
    color: var(--navy-blue);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* Badges */
.badge {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    letter-spacing: 0.5px;
}

.badge.bg-navy {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%) !important;
    box-shadow: 1px 2px 4px rgba(0, 31, 63, 0.15);
}

/* Survey Cards */
.survey-card {
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--navy-blue);
    position: relative;
    overflow: hidden;
}

.survey-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 31, 63, 0.05) 0%, transparent 70%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.survey-card:hover {
    transform: translateY(-8px);
    box-shadow: 4px 12px 24px rgba(0, 0, 0, 0.15);
}

.survey-card:hover::before {
    top: 0;
    right: 0;
}

.survey-card-title {
    color: var(--navy-blue);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.survey-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.survey-stats-item {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 12px;
    box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.survey-stats-item:hover {
    box-shadow: inset 2px 4px 8px rgba(0, 31, 63, 0.08);
}

.survey-stats-value {
    color: var(--navy-blue);
    font-weight: 700;
    font-size: 1.5rem;
}

.survey-stats-label {
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Question Items */
.question-item {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--clay-mid);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.06);
}

.question-item:hover {
    border-color: var(--navy-blue);
    box-shadow: 4px 8px 16px rgba(0, 31, 63, 0.12);
    transform: translateY(-2px);
}

.question-item.has-responses {
    opacity: 0.85;
    border-color: #ffc107;
    background: rgba(255, 255, 255, 0.98);
}

.question-item.has-responses:hover {
    border-color: #ffc107;
    transform: none;
    box-shadow: 2px 4px 12px rgba(255, 193, 7, 0.15);
}

.question-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--clay-mid);
}

.question-number {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 2px 4px 8px rgba(0, 31, 63, 0.2);
}

.question-type-badge {
    background: linear-gradient(135deg, #006699 0%, #0088cc 100%);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 1px 2px 4px rgba(0, 134, 204, 0.2);
}

.question-item-actions {
    display: flex;
    gap: 0.5rem;
}

.question-item-actions button {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.option-input-wrapper input {
    flex: 1;
}

.option-input-wrapper button {
    padding: 0.5rem 0.75rem;
}

/* Toast Styling */
.toast {
    border: none;
    box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.toast.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.toast.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.toast.info {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    color: white;
}

.toast.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9c00 100%);
    color: white;
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Drag Handle */
.drag-handle {
    cursor: move;
    color: #adb5bd;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.drag-handle:hover {
    color: var(--navy-blue);
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 236, 241, 0.95) 100%);
    border-radius: 16px;
    box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.04);
}

.empty-state i {
    font-size: 3.5rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-state h4 {
    color: var(--navy-blue);
    font-weight: 700;
}

.empty-state p {
    color: #6c757d;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand span {
        display: none;
    }

    .survey-stats {
        flex-wrap: wrap;
    }

    .question-item {
        padding: 1rem;
    }

    .question-item-header {
        flex-wrap: wrap;
    }

    .question-item-actions {
        width: 100%;
        margin-top: 1rem;
    }

    .question-item-actions button {
        flex: 1;
    }

    .card {
        border-radius: 12px;
    }

    .btn {
        border-radius: 10px;
    }
}

/* Loading Spinner */
.spinner-border.navy {
    color: var(--navy-blue);
}

/* Status Indicators */
.Status-Badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.Status-Badge.Draft {
    background: linear-gradient(135deg, #e7e7ff 0%, #ddd8ff 100%);
    color: var(--navy-blue);
    box-shadow: inset 1px 2px 4px rgba(0, 31, 63, 0.08);
}

.Status-Badge.Published {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: inset 1px 2px 4px rgba(21, 87, 36, 0.08);
}

.Status-Badge.Closed {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    box-shadow: inset 1px 2px 4px rgba(114, 28, 36, 0.08);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 4px 8px 32px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

.modal-header {
    border-bottom: 2px solid var(--clay-mid);
    border-radius: 16px 16px 0 0;
}

.modal-header.bg-navy {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%) !important;
    border-bottom: none;
}

.modal-footer {
    border-top: 2px solid var(--clay-mid);
    border-radius: 0 0 16px 16px;
}

/* Transitions */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--navy-blue);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .card-header {
        display: none;
    }

    body {
        background-color: white;
    }

    .question-item {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 2rem;
        box-shadow: none;
    }
}

/* Progress Bars */
.progress {
    background: linear-gradient(135deg, #e8ecf1 0%, #d0dce8 100%);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--navy-blue) 0%, var(--navy-blue-light) 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Input groups */
.input-group .btn {
    border-radius: 0 12px 12px 0;
}

.input-group .form-control {
    border-radius: 12px 0 0 12px;
}

/* List Groups */
.list-group-item {
    border: none;
    border-bottom: 2px solid var(--clay-mid);
    background: transparent;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.05) 0%, rgba(0, 61, 102, 0.05) 100%);
}

/* Tutorial Styles */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    pointer-events: none;
}

.tutorial-overlay.highlight {
    pointer-events: none;
}

.tutorial-highlight {
    position: relative;
    z-index: 1050;
    outline: 3px solid #001f3f;
    outline-offset: 4px;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 0 3px #001f3f;
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 8px 4px rgba(0, 31, 63, 0.4);
    }
}

.tutorial-tooltip {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    width: 90vw;
    max-width: 350px;
    max-height: 80vh;
    padding: 1.5rem;
    animation: slideInUp 0.3s ease-out;
    overflow-y: auto;
    box-sizing: border-box;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tutorial-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e8ecf1;
    padding-bottom: 0.75rem;
}

.tutorial-step-counter {
    font-weight: 600;
    color: #001f3f;
    font-size: 0.85rem;
}

.tutorial-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-close-btn:hover {
    color: #001f3f;
}

#tutorialTitle {
    margin: 0;
    color: #001f3f;
    font-size: 1.1rem;
    font-weight: 600;
}

#tutorialDescription {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tutorial-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    border-top: 2px solid #e8ecf1;
    padding-top: 1rem;
    flex-wrap: wrap;
}

.tutorial-buttons .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.tutorial-buttons .btn-outline-secondary {
    min-width: 70px;
}

.tutorial-buttons .btn-navy {
    min-width: 90px;
}

@media (max-width: 576px) {
    .tutorial-tooltip {
        position: fixed !important;
        top: 0 !important;
        position-area: center;
    }
    
    .tutorial-tooltip-content {
        gap: 0.75rem;
    }
    
    .tutorial-step-header {
        padding-bottom: 0.5rem;
    }
    
    #tutorialTitle {
        font-size: 1rem;
    }
    
    #tutorialDescription {
        font-size: 0.9rem;
    }
    
    .tutorial-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .tutorial-buttons .btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .tutorial-buttons .btn-outline-secondary,
    .tutorial-buttons .btn-navy {
        min-width: unset;
    }
}

.tutorial-buttons .btn-navy {
    background: linear-gradient(135deg, #001f3f 0%, #003d66 100%);
    border: none;
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tutorial-buttons .btn-navy:hover {
    background: linear-gradient(135deg, #003d66 0%, #006699 100%);
    color: white;
}

/* Tutorial Arrow Pointer */
.tutorial-tooltip::before {
    display: none;
}
