/**
 * ICEcash Public Styles
 */

/* Container */
.icecash-quote-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
}

.icecash-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1d2327;
    text-align: center;
}

/* Sections */
.icecash-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.icecash-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #1d2327;
}

.icecash-optional {
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

/* Collapsible Sections */
.icecash-collapsible .icecash-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icecash-collapsible .icecash-toggle::after {
    content: '+';
    font-size: 20px;
    color: #666;
}

.icecash-collapsible.open .icecash-toggle::after {
    content: '-';
}

.icecash-collapsible .icecash-content {
    display: none;
    margin-top: 15px;
}

.icecash-collapsible.open .icecash-content {
    display: block;
}

/* Form Elements */
.icecash-form {
    margin: 0;
}

.icecash-field {
    margin-bottom: 15px;
}

.icecash-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #1d2327;
}

.icecash-field .required {
    color: #d63638;
}

.icecash-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.icecash-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}

.icecash-input:invalid {
    border-color: #d63638;
}

.icecash-hint {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Row Layout */
.icecash-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.icecash-half {
    flex: 1;
    min-width: 200px;
}

/* Buttons */
.icecash-actions {
    margin-top: 20px;
    text-align: center;
}

.icecash-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.icecash-btn:hover {
    transform: translateY(-1px);
}

.icecash-btn:active {
    transform: translateY(0);
}

.icecash-btn-primary {
    background: #0073aa;
    color: #fff;
}

.icecash-btn-primary:hover {
    background: #005a87;
}

.icecash-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
}

.icecash-btn-secondary:hover {
    background: #ddd;
}

.icecash-btn-success {
    background: #00a32a;
    color: #fff;
}

.icecash-btn-success:hover {
    background: #008a20;
}

.icecash-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Overlay */
.icecash-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.icecash-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: icecash-spin 1s linear infinite;
}

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

#icecash-loading-text {
    margin-top: 15px;
    color: #666;
}

/* Error Display */
.icecash-error {
    background: #fcf0f0;
    border: 1px solid #d63638;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.icecash-error p {
    color: #d63638;
    margin: 0 0 15px;
}

/* Quote Result */
.icecash-quote-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.icecash-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.icecash-vrn {
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
}

.icecash-vehicle-info {
    font-size: 14px;
    color: #666;
}

.icecash-quote-badge {
    background: #00a32a;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Quote Details Table */
.icecash-details {
    margin-bottom: 20px;
}

.icecash-details-table {
    width: 100%;
    border-collapse: collapse;
}

.icecash-details-table th,
.icecash-details-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.icecash-details-table th {
    font-weight: 500;
    color: #666;
    width: 50%;
}

.icecash-details-table td {
    color: #1d2327;
}

.icecash-details-table tr:last-child th,
.icecash-details-table tr:last-child td {
    border-bottom: none;
}

/* Total Section */
.icecash-total {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.icecash-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.icecash-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
}

/* Payment Methods */
.icecash-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.icecash-payment-method {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.icecash-payment-method:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.icecash-payment-method.selected {
    border-color: #0073aa;
    background: #e7f3ff;
}

.icecash-payment-method input {
    display: none;
}

.icecash-payment-method .method-name {
    font-weight: 500;
    color: #1d2327;
}

/* OTP Input */
.icecash-otp-input {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    max-width: 200px;
    margin: 0 auto;
}

/* Confirmation */
.icecash-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.icecash-confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d8f3dc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icecash-confirmation-icon svg {
    width: 40px;
    height: 40px;
    fill: #00a32a;
}

.icecash-confirmation h3 {
    font-size: 24px;
    color: #00a32a;
    margin-bottom: 10px;
}

.icecash-confirmation p {
    color: #666;
    margin-bottom: 20px;
}

.icecash-confirmation-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
}

.icecash-confirmation-details dt {
    font-weight: 500;
    color: #666;
    margin-top: 10px;
}

.icecash-confirmation-details dd {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 5px 0 0;
}

/* Back Button */
.icecash-back {
    margin-bottom: 20px;
}

.icecash-back-btn {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icecash-back-btn:hover {
    text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .icecash-quote-container {
        padding: 10px;
    }

    .icecash-section {
        padding: 15px;
    }

    .icecash-half {
        min-width: 100%;
    }

    .icecash-quote-header {
        flex-direction: column;
        gap: 10px;
    }

    .icecash-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .icecash-payment-methods {
        grid-template-columns: 1fr;
    }
}
