/* WooCommerce-style Checkout Interface */
.csc-woo-checkout {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3338;
    background: #f0f0f1;
    padding: 20px;
    min-height: 100vh;
}

.csc-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

/* Order Summary Section */
.csc-order-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.csc-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #2c3338;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
}

.csc-order-items {
    margin-bottom: 20px;
}

.csc-order-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f1;
}

.csc-order-item:last-child {
    border-bottom: none;
}

.csc-item-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.csc-item-details {
    flex: 1;
}

.csc-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3338;
}

.csc-item-meta {
    margin: 0;
    font-size: 12px;
    color: #757575;
}

.csc-item-price {
    font-weight: 600;
    color: #2c3338;
    font-size: 15px;
}

.csc-order-subtotal {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.csc-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
}

/* Shipping Section */
.csc-shipping-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.csc-subsection-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #2c3338;
}

.csc-address-section {
    margin-bottom: 30px;
}

.csc-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.csc-form-group {
    margin-bottom: 15px;
}

.csc-form-group.csc-half {
    flex: 1;
}

.csc-form-group.csc-third {
    flex: 1;
}

.csc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3338;
}

.csc-form-group input,
.csc-country-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    color: #2c3338;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.csc-form-group input:focus,
.csc-country-select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 1px #007cba;
}

.csc-country-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Shipping Methods */
.csc-shipping-methods {
    margin: 30px 0;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 6px;
}

.csc-calculate-btn {
    background: #2ca7bd;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 4px rgba(44, 167, 189, 0.2);
}

.csc-calculate-btn:hover {
    background: #248fa3;
    box-shadow: 0 4px 8px rgba(44, 167, 189, 0.3);
    transform: translateY(-1px);
}

.csc-calculate-btn:disabled {
    background: #8c8f94;
    cursor: not-allowed;
}

/* Rates Container */
.csc-rates-container {
    margin-top: 20px;
}

.csc-rates-loading {
    text-align: center;
    padding: 30px;
}

.csc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f1;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.csc-rates-loading p {
    color: #757575;
    font-size: 14px;
    margin: 0;
}

/* Duties Section */
.csc-duties-section {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 15px;
}

.csc-duties-section.csc-minimal {
    padding: 12px 15px;
}

.csc-duties-container {
    position: relative;
}

.csc-duties-header {
    display: flex;
    align-items: center;
    font-weight: 500;
    position: relative;
}

.csc-duties-header.csc-clickable {
    cursor: pointer;
    transition: background 0.2s;
    padding: 8px;
    margin: -8px;
    border-radius: 4px;
}

.csc-duties-header.csc-clickable:hover {
    background: rgba(44, 167, 189, 0.05);
}

.csc-duties-container.csc-collapsed .csc-duties-header {
    margin-bottom: 0;
}

.csc-duties-breakdown-main {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Shipping Options Title */
.csc-shipping-options-title {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 15px 0;
    color: #2c3338;
}

/* Rate Options */
.csc-rate-option {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

.csc-rate-option:hover {
    border-color: #2ca7bd;
    box-shadow: 0 2px 4px rgba(44, 167, 189, 0.2);
}

.csc-rate-option.csc-selected {
    border-color: #2ca7bd;
    background: #f0fbfc;
    box-shadow: 0 2px 8px rgba(44, 167, 189, 0.2);
}

.csc-rate-option.csc-recommended {
    border-color: #00a32a;
}

/* Badges */
.csc-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #2ca7bd;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.csc-badge-fastest {
    background: #d63638;
}

.csc-badge-cheapest {
    background: #00a32a;
}

.csc-badge-economical {
    background: #dba617;
}

/* Rate Header */
.csc-rate-header {
    padding: 15px;
}

.csc-rate-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.csc-rate-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.csc-courier-logo {
    width: 50px;
    height: 40px;
    margin-right: 15px;
    object-fit: contain;
    display: block;
}

.csc-rate-details h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3338;
}

.csc-delivery-time {
    margin: 0;
    font-size: 13px;
    color: #757575;
}

.csc-rate-pricing {
    text-align: right;
}

.csc-shipping-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.csc-price-label {
    font-size: 12px;
    color: #757575;
    margin-bottom: 2px;
}

.csc-price-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3338;
}

/* Duty Icon and Label Styles (shared) */
.csc-duty-icon {
    margin-right: 8px;
    font-size: 16px;
}

.csc-duty-label {
    flex: 1;
    font-size: 14px;
    color: #2c3338;
}

.csc-duty-amount {
    font-size: 16px;
    font-weight: 600;
    color: #2c3338;
    margin-right: 8px;
}

.csc-toggle-icon {
    color: #757575;
    font-size: 12px;
    transition: transform 0.2s;
    display: inline-block;
    width: 16px;
    text-align: center;
}

.csc-breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #757575;
    margin-bottom: 5px;
    padding: 2px 8px;
}

.csc-breakdown-item:last-child {
    margin-bottom: 0;
}

/* Order Total */
.csc-order-total {
    margin-top: 30px;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 6px;
}

.csc-total-breakdown {
    margin-bottom: 20px;
}

.csc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.csc-duties-row {
    color: #2c3338;
}

.csc-final-total {
    border-top: 2px solid #2c3338;
    padding-top: 12px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
}

.csc-place-order-btn {
    background: #2ca7bd;
    color: #ffffff;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(44, 167, 189, 0.2);
}

.csc-place-order-btn:hover {
    background: #248fa3;
    box-shadow: 0 4px 8px rgba(44, 167, 189, 0.3);
    transform: translateY(-1px);
}

/* Error Messages */
.csc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .csc-checkout-container {
        grid-template-columns: 1fr;
    }
    
    .csc-order-section {
        position: static;
    }
    
    .csc-form-row {
        flex-direction: column;
    }
    
    .csc-form-group.csc-half,
    .csc-form-group.csc-third {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .csc-woo-checkout {
        padding: 10px;
    }
    
    .csc-order-section,
    .csc-shipping-section {
        padding: 16px;
    }
    
    .csc-rate-label {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 25px;
    }
    
    .csc-rate-pricing {
        margin-top: 10px;
        text-align: left;
    }
    
    .csc-shipping-price {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
}