/**
 * Pricing Presets Styles V20.4.2
 * 
 * Styles for quick pricing presets and inline discount actions
 */

/* ===== Pricing Presets Section ===== */
.pricing-presets-section {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 1px solid #667eea30;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pricing-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Preset Button Styling */
.pricing-preset-btn {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.pricing-preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.pricing-preset-btn.active {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-color: currentColor;
    font-weight: 600;
}

.preset-icon {
    font-size: 24px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preset-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

.preset-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.preset-values {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

/* ===== Quick Discount Actions ===== */
.quick-discount-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 4px 8px;
    font-size: 11px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.quick-action-btn i {
    font-size: 10px;
    margin-right: 2px;
}

/* ===== Discount Input Enhancement ===== */
.discount-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.discount-input-with-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount-input-with-actions input {
    flex: 1;
    min-width: 60px;
}

/* ===== Modal Enhancements ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .pricing-presets-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-preset-btn {
        padding: 12px;
        gap: 10px;
    }
    
    .preset-icon {
        font-size: 20px;
        min-width: 24px;
    }
    
    .preset-name {
        font-size: 14px;
    }
    
    .preset-desc {
        font-size: 11px;
    }
    
    .quick-discount-actions {
        gap: 3px;
    }
    
    .quick-action-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
}

/* ===== Info Badge Enhancement ===== */
.info-badge {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 8px;
    padding: 12px 15px;
    color: #1565C0;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-badge i {
    margin-top: 2px;
}

/* ===== Animation for Preset Changes ===== */
.pricing-preset-btn.active {
    animation: pulseActive 0.5s ease;
}

@keyframes pulseActive {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

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

/* ===== Table View Switcher ===== */
.table-view-switcher {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
}

.table-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: #666;
}

.table-view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.table-view-btn.active {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-color: currentColor;
    font-weight: 600;
    color: #2c3e50;
}

.table-view-btn i {
    font-size: 14px;
}

.table-view-btn span {
    font-weight: 600;
}

.table-view-btn small {
    font-size: 10px;
    color: #999;
    margin-left: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .pricing-presets-section,
    .quick-discount-actions,
    .table-view-switcher {
        display: none;
    }
}
