/* Custom styles for LivingNow application */

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B3410;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Custom focus styles */
input:focus,
textarea:focus,
select:focus {
    ring-width: 2px;
    ring-color: #8B4513;
    border-color: #8B4513;
}

/* Custom button hover effects */
.btn-primary {
    background-color: #8B4513;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #6B3410;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

/* Persona cards hover effects */
.persona-card {
    transition: all 0.3s ease;
}

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

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced modal styles */
.modal-overlay {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-input:invalid {
    border-color: #EF4444;
}

.form-input:invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Enhanced cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Story content styling */
.story-content {
    line-height: 1.8;
    color: #374151;
}

.story-content p {
    margin-bottom: 1rem;
}

.story-content h1, .story-content h2, .story-content h3 {
    color: #1F2937;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.story-content blockquote {
    border-left: 4px solid #8B4513;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6B7280;
}

/* Enhanced badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #8B4513;
    color: white;
}

.badge-secondary {
    background-color: #6B7280;
    color: white;
}

.badge-success {
    background-color: #10B981;
    color: white;
}

.badge-warning {
    background-color: #F59E0B;
    color: white;
}

.badge-error {
    background-color: #EF4444;
    color: white;
}

/* Enhanced progress bars */
.progress {
    width: 100%;
    height: 0.5rem;
    background-color: #E5E7EB;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #8B4513;
    transition: width 0.3s ease;
}

/* Enhanced tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1F2937;
    color: white;
    text-align: center;
    border-radius: 0.375rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Enhanced alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #ECFDF5;
    border-color: #10B981;
    color: #065F46;
}

.alert-warning {
    background-color: #FFFBEB;
    border-color: #F59E0B;
    color: #92400E;
}

.alert-error {
    background-color: #FEF2F2;
    border-color: #EF4444;
    color: #991B1B;
}

.alert-info {
    background-color: #EFF6FF;
    border-color: #3B82F6;
    color: #1E40AF;
}

/* Enhanced table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.table th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #E5E7EB;
}

.table tr:hover {
    background-color: #F9FAFB;
}

/* Enhanced dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 1;
    border: 1px solid #E5E7EB;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #F3F4F6;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* File upload styles */
.file-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #8B4513;
    background-color: #F9FAFB;
}

.file-upload-area.drag-over {
    border-color: #8B4513;
    background-color: #F5E6D3;
}

/* Custom checkbox and radio styles */
.custom-checkbox,
.custom-radio {
    position: relative;
    display: inline-block;
    margin-right: 0.5rem;
}

.custom-checkbox input,
.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark,
.custom-radio .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #E5E7EB;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.custom-radio .checkmark {
    border-radius: 50%;
}

.custom-checkbox input:checked ~ .checkmark,
.custom-radio input:checked ~ .checkmark {
    background-color: #8B4513;
}

.custom-checkbox .checkmark:after,
.custom-radio .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after,
.custom-radio input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.custom-radio .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .card {
        margin: 0.5rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #E5E7EB;
    }
    
    .story-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}
