/**
 * CloudTech Addon Deposit - Frontend Styles
 */

/* Custom Measurements Box */
.ct-custom-measurements {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.ct-measurements-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
    font-size: 18px;
    color: #333;
}

/* Deposit Notice Box */
.ct-deposit-notice-box {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.ct-deposit-icon {
    font-size: 24px;
    margin-right: 12px;
    line-height: 1;
}

.ct-deposit-notice-content strong {
    display: block;
    margin-bottom: 5px;
    color: #856404;
}

.ct-deposit-notice-content p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Size Guide */
.ct-size-guide {
    text-align: center;
    margin-bottom: 20px;
}

.ct-size-guide-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Measurement Fields */
.ct-measurement-fields {
    display: grid;
    gap: 15px;
}

.ct-field-group {
    display: flex;
    flex-direction: column;
}

.ct-field-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ct-measurement-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ct-measurement-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* Deposit Price Display */
.ct-deposit-price-display {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.ct-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ct-price-row:last-child {
    border-bottom: none;
}

.ct-price-row .ct-label {
    color: #666;
}

.ct-price-row .ct-value {
    font-weight: 600;
    color: #333;
}

.ct-price-row .ct-value.ct-highlight {
    color: #007cba;
    font-size: 16px;
}

.ct-original-price-row .ct-value {
    text-decoration: line-through;
    color: #999;
}

/* Cart/Checkout Deposit Display */
.ct-deposit-subtotal {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ct-deposit-subtotal .ct-original-price {
    color: #999;
    font-size: 13px;
}

.ct-deposit-subtotal .ct-deposit-price {
    color: #007cba;
    font-weight: 600;
}

.ct-deposit-subtotal .ct-deposit-price small {
    font-weight: normal;
    color: #666;
}

/* Deposit Totals Box */
.ct-deposit-totals-box {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.ct-deposit-totals-box h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.ct-deposit-totals-table {
    width: 100%;
}

.ct-deposit-totals-table tr {
    border-bottom: 1px solid #ddd;
}

.ct-deposit-totals-table tr:last-child {
    border-bottom: none;
}

.ct-deposit-totals-table th,
.ct-deposit-totals-table td {
    padding: 10px 0;
    text-align: left;
}

.ct-deposit-totals-table td {
    text-align: right;
}

.ct-original-total td {
    text-decoration: line-through;
    color: #999;
}

.ct-deposit-now td {
    color: #28a745;
}

.ct-balance-later td {
    color: #dc3545;
}

.ct-deposit-notice {
    margin: 15px 0 0 0;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 4px;
}

.ct-deposit-notice small {
    color: #856404;
}

/* Frontend Order Details */
.ct-deposit-info-frontend {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.ct-deposit-info-frontend h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.ct-deposit-summary-table {
    width: 100%;
}

.ct-deposit-summary-table th,
.ct-deposit-summary-table td {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ct-deposit-summary-table tr:last-child th,
.ct-deposit-summary-table tr:last-child td {
    border-bottom: none;
}

.ct-balance-notice {
    margin-top: 15px;
    padding: 12px;
    background-color: #fff3cd;
    border-radius: 4px;
    color: #856404;
}

/* RTL Support */
[dir="rtl"] .ct-deposit-icon {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .ct-field-group label {
    text-align: right;
}

[dir="rtl"] .ct-price-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .ct-deposit-totals-table th {
    text-align: right;
}

[dir="rtl"] .ct-deposit-totals-table td {
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    .ct-deposit-notice-box {
        flex-direction: column;
    }

    .ct-deposit-icon {
        margin-bottom: 10px;
    }

    .ct-price-row {
        flex-direction: column;
        gap: 5px;
    }

    .ct-deposit-totals-table th,
    .ct-deposit-totals-table td {
        display: block;
        text-align: left;
    }

    .ct-deposit-totals-table td {
        padding-top: 0;
    }
}
