/**
 * Stripe Checkout CSS
 * Tyylit vaiheittaiselle maksulomakkeelle
 */

/* Perustyyli */
.fiscal-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.checkout-header {
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px solid #e9ecef;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.merchant-name {
    font-weight: 500;
    color: #333;
}

/* Vaiheittainen lomake */
.multi-step-checkout {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.step-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fafafa;
}

.step-card.active {
    border-color: #5469d4;
    background: white;
}

.step-card.locked {
    opacity: 0.6;
    pointer-events: none;
}

.step-card.locked .step-header {
    cursor: not-allowed;
    background: #f8f8f8;
}

.step-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 16px;
}

.step-card.active .step-number {
    background: #5469d4;
    color: white;
}

.step-title {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.step-status {
    font-size: 20px;
    color: #5469d4;
}

.step-content {
    padding: 0 20px 20px 68px;
    border-top: 1px solid #f0f0f0;
}

/* Lomake-elementit */
.form-section {
    margin-bottom: 20px;
}

.section-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.form-section input[type="text"],
.form-section input[type="email"],
.form-section select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.15s;
}

.form-section input:focus,
.form-section select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Tuotekortti */
.product-card {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
}

.product-card h4 {
    margin: 0;
    font-size: 16px;
}

.product-card p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

/* Hinnoittelutaulukko */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.pricing-table tr {
    background: #f5f5f5;
}

.pricing-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

/* Maksutapa */
.payment-method-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.payment-method {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method.active {
    border-color: #007bff;
    background: #f0f8ff;
}

.payment-method input[type="radio"] {
    display: none;
}

.method-icon {
    font-size: 20px;
}

/* Korttikenttä */
.fiscal-card-element {
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    min-height: 50px;
}

.fiscal-card-element.StripeElement--focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Osoiterivit */
.address-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    margin-top: 10px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Yritystiedot */
.company-fields {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Ehdot */
.terms-text {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #6c757d;
}

.terms-text p {
    margin: 5px 0;
}

/* Lähetä-nappi */
.fiscal-submit-button {
    width: 100%;
    padding: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.fiscal-submit-button:hover:not(:disabled) {
    background: #0056b3;
}

.fiscal-submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Turvallisuusinfo */
.security-info {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
}

/* Onnistumisviesti */
.stripe-success-message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Jatka-painike */
.continue-button {
    margin-top: 20px;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.continue-button:hover:not(:disabled) {
    background: #005a87;
}

.continue-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Tilauksen yhteenveto */
.order-summary {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-summary h4 {
    margin: 0 0 12px 0;
}

.order-summary div {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

/* Responsiivisuus */
@media (max-width: 768px) {
    .fiscal-checkout-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .step-content {
        padding-left: 20px;
    }
    
    .address-row {
        grid-template-columns: 1fr;
    }
}

/* Apuluokat */
.mt-2 {
    margin-top: 10px;
}