/* Telegram Checkout v3.1 */
.tc-checkout {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Progress Bar */
.tc-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.tc-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tc-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.tc-progress-step.tc-active .tc-step-num {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.tc-step-label {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}

.tc-progress-step.tc-active .tc-step-label {
    color: #6366f1;
}

.tc-progress-line {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 15px 20px;
}

.tc-progress-line.tc-done {
    background: #6366f1;
}

/* Steps */
.tc-step { display: none; }
.tc-step.tc-active { display: flex; gap: 25px; }
.tc-step-2.tc-active, .tc-step-3.tc-active { display: block; }

/* Cards */
.tc-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.tc-card h2 {
    margin: 0 0 5px 0;
    font-size: 22px;
}

.tc-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.tc-subtitle {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.tc-card-wide {
    max-width: 600px;
    margin: 0 auto;
}

.tc-card-center {
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
    padding: 50px 30px;
}

/* Layout Step 1 */
.tc-main {
    flex: 1;
}

.tc-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Form */
.tc-field {
    margin-bottom: 15px;
}

.tc-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.tc-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.tc-field input:focus {
    outline: none;
    border-color: #6366f1;
}

.tc-field input::placeholder {
    color: #bbb;
    opacity: 1;
}

.tc-row {
    display: flex;
    gap: 15px;
}

.tc-row .tc-field {
    flex: 1;
}

/* Cart Items - Step 1 Sidebar */
.tc-cart-items {
    margin-bottom: 15px;
}

.tc-cart-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.tc-cart-item:last-child {
    border-bottom: none;
}

.tc-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
}

.tc-no-img {
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.tc-item-details {
    flex: 1;
    min-width: 0;
}

.tc-item-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.tc-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.tc-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fafafa;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.tc-qty-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.tc-qty {
    font-size: 14px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.tc-remove {
    background: none;
    border: none;
    color: #e53935;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.tc-remove:hover {
    color: #c62828;
}

.tc-item-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.tc-cart-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #eee;
    font-size: 16px;
}

.tc-cart-total strong {
    color: #6366f1;
}

/* Step 2 - Order Confirmation */
.tc-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.tc-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.tc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tc-section-header h3 {
    margin: 0;
}

.tc-edit-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.tc-details-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.tc-details-box strong {
    color: #333;
}

/* Order Items - Step 2 */
.tc-order-items {
    margin-bottom: 15px;
}

.tc-order-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    gap: 12px;
}

.tc-order-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: #e0e0e0;
}

.tc-order-details {
    flex: 1;
}

.tc-order-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}

.tc-order-qty {
    font-size: 13px;
    color: #666;
}

.tc-order-price {
    font-size: 15px;
    font-weight: 600;
}

.tc-order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #eee;
    font-size: 17px;
}

.tc-order-total strong {
    color: #6366f1;
    font-size: 18px;
}

/* Buttons */
.tc-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tc-btn:hover {
    opacity: 0.9;
}

.tc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tc-btn-lg {
    padding: 16px;
    font-size: 17px;
}

/* Error & Secure */
.tc-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    font-size: 14px;
}

.tc-error.tc-show {
    display: block;
}

.tc-secure {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 15px;
}

/* Spinner */
.tc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #eee;
    border-top-color: #6366f1;
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: tc-spin 1s linear infinite;
}

@keyframes tc-spin {
    to { transform: rotate(360deg); }
}

/* Payment Option */
.tc-payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #6366f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tc-payment-option:hover {
    background: #f0f0ff;
}

.tc-payment-option input[type="radio"] {
    display: none;
}

.tc-radio-box {
    width: 20px;
    height: 20px;
    border: 2px solid #6366f1;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.tc-payment-option input[type="radio"]:checked + .tc-radio-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
}

.tc-ideal-logo {
    height: 24px;
    width: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .tc-step.tc-active {
        flex-direction: column;
    }

    .tc-sidebar {
        width: 100%;
        order: -1;
    }

    .tc-row {
        flex-direction: column;
        gap: 0;
    }
}
