/* Custom Styles for Bloom Pay Plugin (Matches Brand Aesthetics) */

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

.bloom-pay-container {
    max-width: 540px;
    margin: 40px auto;
    background-color: #E1ECED;
    border-radius: 24px;
    padding: 35px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1F2937;
    direction: ltr;
    text-align: left;
}

/* White Form Card Style */
.bloom-pay-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    transform: translateY(15px);
}

.bloom-pay-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* Card Header */
.bloom-pay-card-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 15px;
}

.bloom-pay-card-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.bloom-pay-card-header p {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Form Elements */
.bloom-pay-card .form-group {
    margin-bottom: 20px;
}

.bloom-pay-card .form-row {
    display: flex;
    margin-left: -10px;
    margin-right: -10px;
}

.bloom-pay-card .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.bloom-pay-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.required-asterisk {
    color: #EF4444;
    margin-left: 2px;
    font-weight: bold;
}

.bloom-pay-card .form-control {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 0.95rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: #1F2937;
}

.bloom-pay-card .form-control:focus {
    border-color: #1F2937;
    box-shadow: 0 0 0 1px #1F2937;
}

.bloom-pay-card .form-control[disabled], 
.bloom-pay-card .form-control[readonly] {
    background-color: #F9FAFB;
    border-color: #E5E7EB;
    color: #4B5563;
    cursor: not-allowed;
    font-weight: bold;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 45px;
    padding-left: 14px;
}

.toggle-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    color: #9CA3AF;
    transition: color 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    color: #4B5563;
}

.password-hint {
    font-size: 0.8rem;
    color: #065F46;
    background: #F0FDF4;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #DCFCE7;
    line-height: 1.4;
}

/* Form Actions / Button Styling (Matches right aligned Submit) */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    color: #FFFFFF;
    background-color: #1E293B; /* Slate navy */
}

.btn:hover {
    background-color: #0F172A; /* Darker slate */
}

.btn:active {
    transform: scale(0.98);
}

/* Spinner loader inside button */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
    margin-left: 8px;
    display: inline-block;
}

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

/* Response message alerts */
.form-response-msg {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-response-msg.success {
    display: block;
    background-color: #F0FDF4;
    border: 1px solid #DCFCE7;
    color: #166534;
}

.form-response-msg.error {
    display: block;
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #991B1B;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success payment view box styling */
.bloom-pay-success-box {
    animation: fadeIn 0.5s ease;
}
