/**
 * TMC Stripe Payment Styles
 */
#tmc-payment-amount {
    padding-left: 40px;
}
.tmc-stripe-payment-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tmc-stripe-test-mode-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
}

.tmc-stripe-test-mode-notice strong {
    display: block;
    margin-bottom: 4px;
}

.tmc-stripe-test-mode-notice small {
    display: block;
    margin-top: 8px;
    opacity: 0.8;
}

.tmc-stripe-payment-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.tmc-stripe-amount-section {
    margin-bottom: 24px;
}

.tmc-stripe-amount-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #30313d;
}

.tmc-contact-fields {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tmc-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tmc-field-group label {
    font-size: 14px;
    color: #30313d;
}

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

.tmc-field-input:focus {
    outline: none;
    border-color: #0570de;
    box-shadow: 0 0 0 3px rgba(5, 112, 222, 0.1);
}

.tmc-required {
    color: #df1b41;
    font-weight: normal;
}

.tmc-optional {
    color: #6b7280;
    font-weight: normal;
    font-size: 13px;
}

.tmc-order-number-field {
    margin-bottom: 20px;
}

/* Payment Method Selector */
.tmc-payment-method-selector {
    margin-bottom: 20px;
}

.tmc-method-selector-label {
    display: block;
    font-size: 14px;
    color: #30313d;
    margin-bottom: 10px;
}

.tmc-method-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tmc-method-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
    background: #fff;
    user-select: none;
}

.tmc-method-option:hover {
    border-color: #0570de;
    background: #f5f9ff;
}

.tmc-method-option.tmc-method-selected {
    border-color: #0570de;
    background: #f0f7ff;
    box-shadow: 0 0 0 1px #0570de;
}

.tmc-method-icon {
    color: #6b7280;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.tmc-method-option.tmc-method-selected .tmc-method-icon {
    color: #0570de;
}

.tmc-method-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tmc-method-name {
    font-size: 15px;
    font-weight: 600;
    color: #30313d;
}

.tmc-method-fee {
    font-size: 13px;
    color: #6b7280;
}

.tmc-method-fee.tmc-no-fee {
    color: #059669;
    font-weight: 500;
}

.tmc-method-check {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: border-color 0.15s, background-color 0.15s;
}

.tmc-method-option.tmc-method-selected .tmc-method-check {
    background: #0570de;
    border-color: #0570de;
    color: #fff;
}

.tmc-order-number-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tmc-order-number-input:focus {
    outline: none;
    border-color: #0570de;
    box-shadow: 0 0 0 3px rgba(5, 112, 222, 0.1);
}

.tmc-amount-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tmc-currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #30313d;
    font-weight: 500;
}

.tmc-payment-amount-input {
    width: 100%;
    padding: 12px 12px 12px 28px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tmc-payment-amount-input:focus {
    outline: none;
    border-color: #0570de;
    box-shadow: 0 0 0 3px rgba(5, 112, 222, 0.1);
}

.tmc-amount-breakdown {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
}

.tmc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.tmc-breakdown-row + .tmc-breakdown-row {
    border-top: 1px solid #e2e8f0;
}

.tmc-total-row {
    font-size: 16px;
    color: #1a202c;
}

.tmc-stripe-payment-element-wrapper {
    margin-bottom: 20px;
}

#tmc-payment-element {
    margin-bottom: 16px;
}

.tmc-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.tmc-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.tmc-message-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.tmc-message-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
}

.tmc-message-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.tmc-stripe-plaid-wrapper {
    margin-bottom: 20px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
}

.tmc-plaid-info {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #1e40af;
}

.tmc-plaid-link-button {
    width: 100%;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tmc-plaid-link-button:hover {
    background: #2563eb;
}

.tmc-submit-button {
    width: 100%;
    padding: 14px 24px;
    background: #0570de;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.tmc-submit-button:hover:not(:disabled) {
    background: #0461c7;
    transform: translateY(-1px);
}

.tmc-submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.tmc-submit-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.tmc-button-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tmc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: tmc-spin 0.6s linear infinite;
}

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

/* Success State */
.tmc-stripe-payment-success {
    text-align: center;
    padding: 40px 20px;
}

.tmc-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.tmc-stripe-payment-success h3 {
    margin: 0 0 12px 0;
    color: #1a202c;
    font-size: 24px;
}

.tmc-stripe-payment-success p {
    color: #6b7280;
    margin: 0 0 20px 0;
}

.tmc-success-details {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 16px;
    margin-top: 20px;
    text-align: left;
}

.tmc-success-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #4a5568;
}

.tmc-home-button {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    background: #5b9de0;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

.tmc-home-button:hover {
    background: #4a8dcf;
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
}

.tmc-home-button:active {
    transform: translateY(0);
}

/* Error State */
.tmc-stripe-payment-error {
    text-align: center;
    padding: 40px 20px;
}

.tmc-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.tmc-stripe-payment-error h3 {
    margin: 0 0 12px 0;
    color: #1a202c;
    font-size: 24px;
}

.tmc-error-message {
    color: #ef4444;
    margin: 0 0 20px 0;
    font-size: 15px;
}

.tmc-retry-button {
    padding: 12px 32px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tmc-retry-button:hover {
    background: #4b5563;
}

/* Responsive */
@media (max-width: 600px) {
    .tmc-stripe-payment-wrapper {
        padding: 16px;
    }
    
    .tmc-stripe-payment-form {
        padding: 16px;
    }
    
    .tmc-submit-button {
        font-size: 15px;
        padding: 12px 20px;
    }
}
