/* ===================================
   Report Forms Modern Design System
   קובץ CSS לעיצוב טפסי דוחות
   =================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Main Container */
.report-page {
    padding: 40px 0;
    min-height: calc(100vh - 350px);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.report-page .ev-container {
    max-width: 100%;  /* Full width */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Grid Layout - RTL Support with Float */
.report-layout {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;  /* Clearfix */
    direction: rtl;
}

/* Sidebar appears on RIGHT using float */
.sidebar-card {
    float: right;  /* צף לימין */
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    background: #fff;
    border-radius: 20px 0 0 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
    position: sticky;
    top: 20px;
}

/* Main Form Container - appears on LEFT using margin */
.main-form-container {
    margin-right: 320px;  /* משאיר מקום לסיידבר + רווח */
    width: auto;
    direction: rtl;
    overflow: visible;
}

/* Main Form card */
.main-form-card {
    width: 100%;
    direction: rtl;
    background: #fff;
    border-radius: 0 20px 20px 0;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Images Section */
.images-section {
    margin-bottom: 30px;
}

.report-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.report-image:hover {
    transform: scale(1.02);
}

/* Saved Reports Section */
.saved-reports-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
}

.saved-reports-section h4 {
    font-size: 18px;
    color: #032737;
    margin-bottom: 15px;
    font-weight: 600;
}

.reports-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.reports-dropdown:focus {
    outline: none;
    border-color: #6497b1;
    box-shadow: 0 0 0 3px rgba(100, 151, 177, 0.1);
}

.report-action-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.btn-load {
    background: #6497b1;
    color: white;
}

.btn-load:hover {
    background: #537d93;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 151, 177, 0.3);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-clear {
    background: #6c757d;
    color: white;
}

.btn-clear:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Main Form Card */
.main-form-card {
    background: #fff;
    border-radius: 0 20px 20px 0;  /* Rounded only on left side */
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100% !important;
    max-width: none !important;
    flex: 1 !important;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 32px;
    font-weight: 900;
    color: #032737;
    margin-bottom: 15px;
}

.form-header .subtitle {
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
}

.section-header {
    background: linear-gradient(135deg, #6497b1 0%, #537d93 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(100, 151, 177, 0.3);
}

.section-header h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.section-header p {
    margin: 8px 0 0 0;
    font-size: 14px;
    opacity: 0.95;
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 25px;
}

.form-group-modern label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #032737;
    margin-bottom: 10px;
}

.form-group-modern label .required {
    color: #dc3545;
    margin-right: 3px;
}

/* Input Fields - Modern Design */
.form-input-modern,
.form-select-modern,
.form-textarea-modern {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input-modern:focus,
.form-select-modern:focus,
.form-textarea-modern:focus {
    outline: none;
    border-color: #6497b1;
    background: white;
    box-shadow: 0 0 0 4px rgba(100, 151, 177, 0.1);
    transform: translateY(-2px);
}

.form-input-modern::placeholder {
    color: #adb5bd;
}

/* Select Dropdown */
.form-select-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23032737' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 45px;
    cursor: pointer;
}

/* Textarea */
.form-textarea-modern {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Radio Buttons Section */
.radio-group-card {
    background: linear-gradient(135deg, #6497b1 0%, #537d93 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(100, 151, 177, 0.3);
}

.radio-group-card label.group-title {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-option label {
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: white;
}

/* Three Column Layout - פתרון חזק */
.form-row-modern {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 25px !important;
    width: 100% !important;
}

/* ביטול כל float או display אחר על הילדים */
.form-row-modern > .form-group-modern {
    float: none !important;
    display: block !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Two Column Layout - במידת הצורך */
.form-row-modern.two-columns {
    grid-template-columns: repeat(2, 1fr) !important;
}

.form-row-modern.three-cols {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .form-row-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row-modern,
    .form-row-modern.two-columns {
        grid-template-columns: 1fr;
    }
}


/* Info Box */
.info-box {
    background: #e8f4f8;
    border-right: 4px solid #6497b1;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.info-box p {
    margin: 0;
    color: #032737;
    font-size: 14px;
    line-height: 1.6;
}

.info-box .icon {
    color: #6497b1;
    margin-left: 10px;
    font-size: 20px;
}

/* Tooltip Icon */
.tooltip-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    cursor: pointer;
}

/* Submit Buttons Section */
.submit-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.submit-section .save-info {
    margin-bottom: 20px;
}

.submit-section h5 {
    color: #032737;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.submit-section h6 {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.submit-btn-modern {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.submit-btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-save:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

.btn-update {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #032737;
}

.btn-update:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e68900 100%);
}

.btn-generate {
    background: linear-gradient(135deg, #032737 0%, #6497b1 100%);
    color: white;
}

.btn-generate:hover {
    background: linear-gradient(135deg, #021a26 0%, #537d93 100%);
}

/* Subscription Link */
.subscription-link {
    display: inline-block;
    background: #032737;
    color: white !important;
    padding: 15px 30px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.subscription-link:hover {
    background: #6497b1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 39, 55, 0.3);
    text-decoration: none;
    color: white !important;
}

/* Responsive Design - Medium screens */
@media (max-width: 1200px) {
    .report-layout {
        overflow: visible;
    }
    
    .sidebar-card {
        float: none;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        border-radius: 20px;
        position: relative;
        top: 0;
        margin-bottom: 20px !important;
    }
    
    .main-form-container {
        margin-right: 0;
        width: 100%;
    }
    
    .main-form-card {
        border-radius: 20px;
    }
}

/* Responsive Design - Small screens */
@media (max-width: 768px) {
    .report-page {
        padding: 20px 0;
    }

    .sidebar-card,
    .main-form-card {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .section-header h4 {
        font-size: 18px;
    }

    .radio-options {
        flex-direction: column;
        gap: 15px;
    }

    .submit-btn-modern {
        font-size: 14px;
        padding: 15px 20px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Success/Error Messages */
.alert-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-right: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-right: 4px solid #dc3545;
}

/* Print Styles */
@media print {
    .sidebar-card,
    .submit-section {
        display: none;
    }

    .main-form-card {
        box-shadow: none;
    }
}
