/**
 * ----------------------------------------------------------------------------
 * Project: Faraz Shop
 * Module: Temporary Garment Price Calculator
 * Type: CSS
 * Version: 2.0.0
 * Purpose: Complete calculator styling
 *
 * Changelog:
 * 2.0.0 - Complete calculator interface
 * ----------------------------------------------------------------------------
 */

#faraz-price-calculator {
    direction: rtl;
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    font-family: inherit;
    color: #222222;
}

#faraz-price-calculator *,
#faraz-price-calculator *::before,
#faraz-price-calculator *::after {
    box-sizing: border-box;
}

.faraz-card,
.faraz-list-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}

.faraz-title {
    margin: 0 0 25px;
    padding: 0;
    font-size: 22px;
    line-height: 1.5;
    font-weight: 700;
    text-align: right;
}

.faraz-field {
    width: 100%;
    margin-bottom: 18px;
}

.faraz-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    text-align: right;
}

.faraz-field input {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #dddddd;
    border-radius: 14px;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
    outline: none;
}

.faraz-field input:focus {
    border-color: #f28c28;
    box-shadow: 0 0 0 2px rgba(242, 140, 40, 0.12);
}

.faraz-field input::placeholder {
    color: #999999;
}

.faraz-input-with-unit {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
}

.faraz-input-with-unit input {
    flex: 1;
    min-width: 0;
}

.faraz-input-with-unit span {
    flex: 0 0 auto;
    min-width: 70px;
    color: #555555;
    font-size: 13px;
    text-align: center;
}

.faraz-field small {
    display: block;
    margin-top: 6px;
    color: #777777;
    font-size: 12px;
    line-height: 1.7;
    text-align: right;
}

.faraz-helper {
    margin-top: 7px;
    color: #777777;
    font-size: 13px;
    line-height: 1.7;
    text-align: right;
}

.faraz-results {
    width: 100%;
    margin-top: 25px;
    padding: 18px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 14px;
}

.faraz-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #eeeeee;
    text-align: right;
}

.faraz-result-row:last-child {
    border-bottom: none;
}

.faraz-result-row span {
    font-size: 14px;
}

.faraz-result-row strong {
    color: #222222;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.faraz-button,
.faraz-delete-button,
.faraz-single-delete {
    border: none;
    border-radius: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.faraz-button {
    width: 100%;
    height: 52px;
    margin-top: 20px;
    padding: 0 20px;
    background: #1976D2;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.faraz-button:hover,
.faraz-delete-button:hover,
.faraz-single-delete:hover {
    opacity: 0.9;
}

.faraz-button:active,
.faraz-delete-button:active,
.faraz-single-delete:active {
    transform: translateY(1px);
}

.faraz-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.faraz-message {
    min-height: 20px;
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.faraz-message.success {
    color: #278a45;
}

.faraz-message.error {
    color: #c62828;
}

.faraz-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.faraz-list-header .faraz-title {
    margin: 0;
}

.faraz-delete-button {
    min-height: 42px;
    padding: 8px 16px;
    background: #f28c28;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.faraz-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.faraz-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    border-spacing: 0;
}

.faraz-table th,
.faraz-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eeeeee;
    text-align: right;
    vertical-align: middle;
    font-size: 13px;
}

.faraz-table th {
    background: #fafafa;
    font-weight: 700;
    white-space: nowrap;
}

.faraz-table td {
    color: #444444;
}

.faraz-table input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    cursor: pointer;
}

.faraz-single-delete {
    padding: 7px 12px;
    background: #f28c28;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.faraz-empty-row td {
    padding: 25px 10px;
    color: #777777;
    text-align: center;
}

@media (max-width: 600px) {

    #faraz-price-calculator {
        width: 100%;
        margin: 20px auto;
    }

    .faraz-card,
    .faraz-list-card {
        padding: 16px;
        border-radius: 14px;
    }

    .faraz-title {
        font-size: 19px;
    }

    .faraz-field input {
        height: 46px;
    }

    .faraz-result-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .faraz-result-row strong {
        font-size: 16px;
    }

    .faraz-button {
        height: 50px;
    }

    .faraz-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .faraz-delete-button {
        width: 100%;
    }

}

/* ==========================================================================
   Project: Faraz Shop
   Module: Temporary Garment Price Calculator
   Type: CSS
   Version: 2.2.0
   Purpose: Visual improvements for results, tables and buttons

   Changelog:
   2.2.0 - Added alternating result rows
   2.2.0 - Added alternating table rows
   2.2.0 - Updated buttons to sky blue
   2.2.0 - Standardized button radius to 14px
   ========================================================================== */


/* --------------------------------------------------------------------------
   Result Box
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-results {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #d9e2ec;
    margin-top: 25px;
}


/* --------------------------------------------------------------------------
   Result Rows - Alternating Colors
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 52px;
    padding: 12px 16px;
    box-sizing: border-box;
}


/* روشن */

#faraz-price-calculator .faraz-result-row:nth-child(odd) {
    background: #f7fbff !important;
}


/* تیره */

#faraz-price-calculator .faraz-result-row:nth-child(even) {
    background: #e6f2fb !important;
}


/* نتیجه مبلغ */

#faraz-price-calculator .faraz-result-row strong {
    font-weight: 700;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Main Button
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-button {
    background: #29a9e8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    min-height: 52px;
    cursor: pointer;
}


/* Hover */

#faraz-price-calculator .faraz-button:hover {
    background: #1597d5 !important;
    color: #ffffff !important;
}


/* --------------------------------------------------------------------------
   Delete Buttons
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-delete-button,
#faraz-price-calculator .faraz-single-delete {
    background: #29a9e8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    cursor: pointer;
}


/* Hover */

#faraz-price-calculator .faraz-delete-button:hover,
#faraz-price-calculator .faraz-single-delete:hover {
    background: #1597d5 !important;
    color: #ffffff !important;
}


/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-table {
    border-collapse: collapse;
    width: 100%;
}


/* Table Header */

#faraz-price-calculator .faraz-table thead th {
    background: #dceefa !important;
    color: #1d3445;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   Table Rows - Alternating Colors
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}


#faraz-price-calculator .faraz-table tbody tr:nth-child(even) {
    background: #f1f7fb !important;
}


/* Hover Row */

#faraz-price-calculator .faraz-table tbody tr:hover {
    background: #e2f2fc !important;
}


/* --------------------------------------------------------------------------
   Table Cells
   -------------------------------------------------------------------------- */

#faraz-price-calculator .faraz-table th,
#faraz-price-calculator .faraz-table td {
    border-bottom: 1px solid #dce5ec;
}


/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {

    #faraz-price-calculator .faraz-result-row {
        min-height: 50px;
        padding: 11px 13px;
        font-size: 14px;
    }

    #faraz-price-calculator .faraz-result-row strong {
        font-size: 14px;
    }

}