/* Used Laptop Pricer Plugin Styles */

/* RTL Support and Persian Fonts */
.ulp-container {
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial', sans-serif;
    line-height: 1.6;
}

/* Main Container */
.ulp-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ulp-form-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* Form Title */
.ulp-form-title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
}

/* Form Styles */
.ulp-form {
    margin-bottom: 30px;
}

.ulp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.ulp-form-group {
    flex: 1;
    min-width: 250px;
}

.ulp-full-width {
    flex: 100%;
}

.ulp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
    font-size: 14px;
}

.ulp-form-group input,
.ulp-form-group select,
.ulp-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ulp-form-group input:focus,
.ulp-form-group select:focus,
.ulp-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ulp-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
.ulp-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.ulp-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.ulp-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Price Result Display */
.ulp-price-result {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.ulp-price-header h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    text-align: center;
    color: white;
}

.ulp-price-content {
    text-align: center;
}

.ulp-price-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.ulp-currency {
    font-size: 18px;
    margin-right: 10px;
    opacity: 0.9;
}

/* Price Breakdown */
.ulp-price-breakdown {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.ulp-breakdown-title {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
    color: white;
}

.ulp-breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ulp-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ulp-breakdown-item:last-child {
    border-bottom: none;
}

.ulp-breakdown-component {
    font-weight: bold;
    color: white;
}

.ulp-breakdown-model {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.ulp-breakdown-price {
    font-weight: bold;
    color: white;
}

.ulp-depreciation-note {
    margin-top: 15px;
    text-align: center;
    opacity: 0.8;
    font-size: 12px;
}

/* Loading Indicator */
.ulp-loading {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.ulp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ulp-loading p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Error Display */
.ulp-error {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.ulp-error p {
    margin: 0;
    font-weight: bold;
}

/* Form Validation */
.ulp-error-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Admin Styles */
.ulp-admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ulp-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.ulp-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.ulp-form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.ulp-form-row input {
    flex: 1;
    min-width: 200px;
}

.ulp-form-row button {
    white-space: nowrap;
}

.ulp-models-list {
    margin-top: 20px;
}

.ulp-model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.ulp-model-name {
    font-weight: bold;
    color: #2c3e50;
}

.ulp-model-price {
    color: #27ae60;
    font-weight: bold;
    margin: 0 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ulp-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .ulp-form-group {
        min-width: auto;
    }
    
    .ulp-model-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .ulp-breakdown-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .ulp-price-amount {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .ulp-submit-btn,
    .ulp-loading,
    .ulp-error {
        display: none !important;
    }
    
    .ulp-price-result {
        background: white !important;
        color: black !important;
        border: 2px solid #27ae60;
    }
}

/* =================================================================== */
/* ==================== کدهای جدید و اصلاح شده ======================= */
/* =================================================================== */

/* --- استایل‌های منوی کشویی ادمین --- */
.ulp-accordion-header {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
    padding: 15px 25px !important;
    margin: -25px -25px 20px -25px !important;
}

.ulp-accordion-header:hover {
    background-color: #f0f0f1;
}

.ulp-accordion-header::after {
    content: '+';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    color: #50575e;
}

.ulp-accordion-header.active::after {
    content: '−';
}

.ulp-feature-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* --- استایل‌های چک‌باکس‌های سفارشی (فرم جلوی سایت) --- */
.ulp-bonus-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
}

.ulp-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.ulp-checkbox-wrapper label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    font-weight: normal !important;
}

.ulp-checkbox-wrapper label:hover {
    border-color: #3498db;
    background-color: #f1f8ff;
}

.ulp-checkbox-wrapper label .ulp-percent-badge {
    margin-right: auto;
    font-size: 0.9em;
    color: #555;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.ulp-checkbox-wrapper label::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    margin-left: 10px;
    background-color: white;
    transition: all 0.2s;
}

.ulp-checkbox-wrapper input[type="checkbox"]:checked + label {
    border-color: #27ae60;
    background-color: #e8f8ee;
    font-weight: bold !important;
    color: #2c3e50;
}

.ulp-checkbox-wrapper input[type="checkbox"]:checked + label::before {
    background-color: #27ae60;
    border-color: #27ae60;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    .ulp-bonus-features {
        grid-template-columns: 1fr;
    }
}

/* --- استایل متفاوت و جدید برای دکمه‌های وضعیت کارکرد --- */
.ulp-radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border: none; /* حذف کادر دور گروه */
    padding: 0;
}

.ulp-radio-wrapper input[type="radio"] {
    display: none;
}

/* استایل دکمه‌ها شبیه به Pill یا Tab */
.ulp-radio-wrapper label {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 50px; /* گرد کردن کامل گوشه‌ها */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-weight: bold !important;
    color: #7f8c8d; /* رنگ متن در حالت عادی */
}

.ulp-radio-wrapper label:hover {
    border-color: #3498db;
    color: #2980b9;
}

/* استایل دکمه در حالت انتخاب شده */
.ulp-radio-wrapper input[type="radio"]:checked + label {
    border-color: #2980b9;
    background-color: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
    
/* افزودن آیکون تیک به گزینه انتخاب شده */
.ulp-radio-wrapper input[type="radio"]:checked + label::before {
    content: '✔';
    color: white;
    font-size: 14px;
    margin-left: 8px; /* فاصله از متن */
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .ulp-radio-group {
        grid-template-columns: 1fr;
    }
}