/* Compact & Beautiful Journal Form - Each Field Has Its Own Card */

/* Form Container */
#journalForm {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Container - Transparent */
.compact-section {
    margin-bottom: 1rem;
}

/* Section Header - Simple */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

[data-theme="dark"] .section-title {
    color: #f1f5f9;
}

/* Individual Field Cards - Each with Own Color */
.compact-section .form-group {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-section .form-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .compact-section .form-group {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(71, 85, 105, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .compact-section .form-group:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}

/* Color Themes for Individual Cards */
.theme-blue .form-group {
    border-color: rgba(59, 130, 246, 0.3);
}

.theme-blue .form-group:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.theme-blue .section-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.theme-purple .form-group {
    border-color: rgba(139, 92, 246, 0.3);
}

.theme-purple .form-group:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
}

.theme-purple .section-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.theme-green .form-group {
    border-color: rgba(16, 185, 129, 0.3);
}

.theme-green .form-group:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.theme-green .section-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.theme-amber .form-group {
    border-color: rgba(245, 158, 11, 0.3);
}

.theme-amber .form-group:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.theme-amber .section-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.theme-pink .form-group {
    border-color: rgba(236, 72, 153, 0.3);
}

.theme-pink .form-group:hover {
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.15);
}

.theme-pink .section-icon {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.theme-red .form-group {
    border-color: rgba(239, 68, 68, 0.3);
}

.theme-red .form-group:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.theme-red .section-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Form Labels */
.compact-section .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: block;
    color: var(--text);
}

[data-theme="dark"] .compact-section .form-label {
    color: #e2e8f0;
}

/* Compact Inputs */
.compact-section .form-input,
.compact-section .form-select,
.compact-section .form-textarea {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.compact-section .form-textarea {
    min-height: 50px;
}

/* Compact Quick Buttons */
.compact-section .quick-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
}

.compact-section .quality-btn {
    padding: 0.5rem;
    font-size: 0.8125rem;
}

/* Grid Layouts - Responsive */
.grid-compact-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.grid-compact-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .grid-compact-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (below 768px) */
@media (max-width: 768px) {
    .grid-compact-2,
    .grid-compact-3 {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
}

/* Quick Select Grid - Responsive */
.quick-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 0.5rem;
}

.quick-grid-compact-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.quick-grid-compact-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
    .quick-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .quick-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    }
    
    .quick-grid-compact-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-grid-compact-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-grid-compact-3,
    .quick-grid-compact-4,
    .quick-grid-compact-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Required Star */
.compact-section .required-star {
    color: #ef4444;
    font-size: 0.75rem;
    margin-left: 0.125rem;
}

/* Compact Action Buttons */
.form-actions-compact {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
}

.form-actions-compact button {
    flex: 1;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 10px;
}

@media (max-width: 640px) {
    .form-actions-compact {
        flex-direction: column;
    }
}

/* Premium Button Style */
.btn-premium-journal {
    position: relative;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4);
}

.btn-premium-journal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s;
}

.btn-premium-journal:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.5);
}

.btn-premium-journal:hover::before {
    left: 100%;
}

/* Smooth Animations */
.compact-section .form-group {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger Animation for Cards */
.compact-section .form-group:nth-child(1) { animation-delay: 0.05s; }
.compact-section .form-group:nth-child(2) { animation-delay: 0.1s; }
.compact-section .form-group:nth-child(3) { animation-delay: 0.15s; }
.compact-section .form-group:nth-child(4) { animation-delay: 0.2s; }
.compact-section .form-group:nth-child(5) { animation-delay: 0.25s; }

/* Responsive Padding and Sizing */
@media (max-width: 1024px) {
    #journalForm {
        max-width: 100%;
    }
    
    .compact-section .form-group {
        padding: 0.875rem;
    }
}

@media (max-width: 768px) {
    .compact-section {
        margin-bottom: 1.25rem;
    }
    
    .compact-section .form-group {
        padding: 0.75rem;
        margin-bottom: 0.625rem;
        border-radius: 12px;
    }
    
    .section-header {
        margin-bottom: 0.75rem;
        padding: 0.375rem 0;
    }
    
    .section-icon {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }
    
    .section-title {
        font-size: 0.9375rem;
    }
    
    .compact-section .form-label {
        font-size: 0.8125rem;
    }
    
    .compact-section .form-input,
    .compact-section .form-select,
    .compact-section .form-textarea {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .compact-section .quick-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    .compact-section .quality-btn {
        padding: 0.5rem 0.375rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .compact-section .form-group {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .section-header {
        gap: 0.5rem;
    }
    
    .section-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 0.875rem;
    }
    
    .compact-section .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }
    
    .compact-section .form-input,
    .compact-section .form-select,
    .compact-section .form-textarea {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .compact-section .quick-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .compact-section .quality-btn {
        padding: 0.375rem;
        font-size: 0.75rem;
    }
    
    .form-actions-compact {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .form-actions-compact button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .compact-section .form-group {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
}

/* Laptop Optimization (1024px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    #journalForm {
        max-width: 1200px;
        padding: 0 1rem;
    }
    
    .compact-section {
        margin-bottom: 0.875rem;
    }
    
    .compact-section .form-group {
        padding: 0.625rem;
        margin-bottom: 0.375rem;
    }
    
    .section-header {
        margin-bottom: 0.625rem;
    }
    
    .section-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .quick-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .quality-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .grid-compact-2 {
        gap: 0.625rem;
    }
    
    .grid-compact-3 {
        gap: 0.625rem;
    }
    
    .quick-grid-compact {
        gap: 0.5rem;
    }
    
    .quick-grid-compact-2 {
        gap: 0.5rem;
    }
    
    .quick-grid-compact-3 {
        gap: 0.5rem;
    }
    
    .form-actions-compact {
        margin-top: 1rem;
        gap: 0.75rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Small Laptop (1024px - 1280px) - More compact */
@media (min-width: 1025px) and (max-width: 1280px) {
    #journalForm {
        max-width: 1100px;
    }
    
    .compact-section {
        margin-bottom: 0.75rem;
    }
    
    .compact-section .form-group {
        padding: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.4375rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .quick-btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .quality-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}
