/* Financing Page Styles */

/* Global Styles */
body {
    background-color: #f9fafb;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 300px;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.message.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.message-close {
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
}

/* Main Content */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.page-description {
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 32px;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Order Summary */
.order-summary {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.order-summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

/* Order Item */
.order-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.order-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.order-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.order-item-sku {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.order-item-quantity {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.order-item-price {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

/* Financing Details */
.financing-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.financing-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.financing-detail-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.financing-detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.financing-detail-value.yellow {
    color: #d97706;
    font-weight: 600;
}

/* Total */
.total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.total-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.total-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

/* Benefits */
.benefits {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.benefits-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.benefit-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #10b981;
    margin-right: 12px;
    margin-top: 2px;
}

.benefit-item span {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Application Form */
.application-form {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section {
    margin-bottom: 32px;
}

.form-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    color: #111827;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Terms Section */
.terms-section {
    margin: 32px 0;
}

.terms-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.terms-checkbox {
    margin-right: 10px;
    margin-top: 2px;
}

.terms-label {
    font-size: 0.875rem;
    color: #4b5563;
}

.terms-link {
    color: #3b82f6;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Submit Buttons */
.submit-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.submit-button {
    flex: 1;
    background-color: #111827;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.submit-button:hover {
    background-color: #1f2937;
}

.cancel-button {
    flex: 1;
    background-color: white;
    color: #4b5563;
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.cancel-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Security Notice */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.security-icon {
    width: 20px;
    height: 20px;
    color: #10b981;
    margin-right: 8px;
}

.security-notice span {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }

    .page-title {
        font-size: 2rem;
    }

    .order-item {
        flex-direction: column;
        gap: 12px;
    }

    .order-item-image {
        width: 100%;
        height: 120px;
    }

    .submit-buttons {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
