/* OMR Template Editor Styles - Enhanced Version */
.omr-te-main-container {
    padding: 0;
    margin: 0;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* Header Section - Enhanced */
.omr-te-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.omr-te-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.omr-te-header h3 i {
    font-size: 24px;
}

.omr-te-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    font-weight: 300;
}

/* Stats Section - Card Style */
.omr-te-stats {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eef3;
}

.omr-te-stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border-right: 1px solid #e8eef3;
}

.omr-te-stat-item:last-child {
    border-right: none;
    flex: 0 0 auto;
    min-width: auto;
}

.omr-te-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    display: block;
    line-height: 1.2;
    margin-bottom: 4px;
}

.omr-te-stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Auto Fill Button - Enhanced */
.omr-te-auto-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.omr-te-auto-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.omr-te-auto-btn:active {
    transform: translateY(0);
}

.omr-te-auto-btn i {
    font-size: 14px;
}

/* Sections Container - Enhanced Grid */
.omr-te-sections-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Section Card - Enhanced */
.omr-te-section {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eef3;
    transition: all 0.3s ease;
}

.omr-te-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Section Header - Enhanced */
.omr-te-section-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 14px 16px;
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid #3498db;
}

.omr-te-section-header i {
    font-size: 16px;
    opacity: 0.9;
}

/* Section Content */
.omr-te-section-content {
    padding: 12px;
}

/* Item Card - Enhanced */
.omr-te-item {
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    margin: 0 0 12px 0;
    padding: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.omr-te-item:last-child {
    margin-bottom: 0;
}

.omr-te-item:hover {
    border-color: #3498db;
    background: white;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.15);
    transform: translateX(2px);
}

.omr-te-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.omr-te-item:hover::before {
    opacity: 1;
}

/* Field Styling */
.omr-te-field {
    margin-bottom: 10px;
}

.omr-te-field:last-child {
    margin-bottom: 0;
}

/* Label - Enhanced */
.omr-te-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.omr-te-label i {
    color: #667eea;
    font-size: 13px;
}

/* Input Group - Enhanced */
.omr-te-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
}

.omr-te-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #dce4ec;
}

/* Arrow Icon */
.omr-te-arrow {
    color: #3498db;
    font-size: 12px;
    font-weight: bold;
}

/* Count Badge - Enhanced */
.omr-te-count {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    letter-spacing: 0.3px;
}

.omr-te-count.omr-te-count-zero {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

/* Expected Count Badge */
.omr-te-expected {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
    position: relative;
}

.omr-te-expected::before {
    content: 'Hedef: ';
    opacity: 0.9;
}

/* Auto Calculate Button - Small */
.omr-te-auto-calc-btn {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.omr-te-auto-calc-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: scale(1.05);
}

.omr-te-auto-calc-btn i {
    font-size: 12px;
}

/* Success Indicator - Enhanced */
.omr-te-success-indicator {
    color: #27ae60;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 18px;
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.omr-te-success-indicator.omr-te-show {
    opacity: 1;
    animation: omr-te-pulse 0.6s ease;
}

@keyframes omr-te-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Editable Fields - Enhanced */
.editable {
    font-size: 14px !important;
    padding: 3px 8px !important;
    min-width: 35px !important;
    text-align: center !important;
    border-radius: 4px !important;
    background: white !important;
    border: 1px solid #dce4ec !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    transition: all 0.2s ease !important;
}

.editable:hover {
    border-color: #3498db !important;
    background: #ecf6fd !important;
}

/* Responsive Design - Enhanced */
@media (max-width: 1400px) {
    .omr-te-sections-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 1200px) {
    .omr-te-sections-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .omr-te-header h3 {
        font-size: 20px;
    }

    .omr-te-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .omr-te-sections-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .omr-te-stats {
        flex-direction: column;
        padding: 15px;
    }

    .omr-te-stat-item {
        border-right: none;
        border-bottom: 1px solid #e8eef3;
        padding: 12px;
        width: 100%;
    }

    .omr-te-stat-item:last-child {
        border-bottom: none;
    }

    .omr-te-header {
        padding: 16px;
    }

    .omr-te-header h3 {
        font-size: 18px;
    }

    .omr-te-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .omr-te-input-wrapper {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .omr-te-item {
        padding: 10px;
    }

    .omr-te-section-content {
        padding: 8px;
    }

    .omr-te-auto-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Loading State */
.omr-te-loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.omr-te-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-top-color: transparent;
    border-radius: 50%;
    animation: omr-te-spin 0.8s linear infinite;
}

@keyframes omr-te-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip Enhancement */
[title] {
    position: relative;
    cursor: help;
}

/* Print Styles */
@media print {
    .omr-te-auto-btn,
    .omr-te-auto-calc-btn {
        display: none;
    }

    .omr-te-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}