/**
 * Custom Tripay Checkout Stylesheet
 * Rich Aesthetics with Premium Modern Design (Glassmorphism & Harmonious Gradients)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

.tripay-checkout-container {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 520px;
    margin: 2rem auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.tripay-checkout-container * {
    box-sizing: border-box;
}

/* Glassmorphic premium card design */
.tripay-checkout-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(31, 38, 135, 0.06), 
                0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 2.2rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tripay-checkout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.1);
}

/* Card Header */
.tripay-card-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tripay-card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Price & Ref Tags */
.tripay-price-tag {
    text-align: right;
}

.tripay-price-tag .label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.tripay-price-tag .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
}

.tripay-ref-tag {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Form Styles */
.tripay-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tripay-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tripay-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.tripay-form-group label .required {
    color: #ef4444;
}

.tripay-form-group input[type="text"],
.tripay-form-group input[type="email"],
.tripay-form-group input[type="tel"],
.tripay-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.tripay-form-group input:focus,
.tripay-form-group select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* Custom Select Dropdown Styling */
.tripay-select-wrapper {
    position: relative;
    width: 100%;
}

.tripay-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}

.tripay-select-wrapper::after {
    content: "";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.8rem;
    height: 0.8rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* Button & Spinner */
.tripay-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 0.5rem;
}

.tripay-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.tripay-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.tripay-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-spinner {
    position: absolute;
    width: 1.4rem;
    height: 1.4rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: tripay-spin 1s ease-in-out infinite;
}

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

/* Alerts */
.tripay-alert {
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.tripay-alert.error {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Virtual Account & Copy Box */
.tripay-va-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
}

.va-title {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.va-number-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.va-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.copy-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* Accordion for Steps */
.tripay-instructions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tripay-accordion-item {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.tripay-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.tripay-accordion-header:hover {
    background: #f1f5f9;
}

.tripay-accordion-icon {
    width: 0.8rem;
    height: 0.8rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 4.5l7.5 7.5-7.5 7.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.tripay-accordion-item.active .tripay-accordion-icon {
    transform: rotate(90deg);
}

.tripay-accordion-content {
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1.25rem;
}

/* Step list */
.tripay-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tripay-steps-list li {
    display: flex;
    gap: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #475569;
}

.tripay-steps-list .step-num {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.tripay-steps-list .step-desc {
    flex: 1;
}
