/* ==========================================================================
   PAYMENT PAGE
   ========================================================================== */

:root {
    --payment-accent: #4682b4;
    --payment-text: #1e293b;
    --payment-text-muted: #64748b;
    --payment-bg: #ffffff;
    --payment-bg-subtle: #f8fafc;
    --payment-border: #e2e8f0;
    --payment-radius: 12px;
    --payment-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}



.payment-page {
    width: 100%;
    margin-bottom: 80px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.payment-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: var(--payment-text);
}

/* --------------------------------------------------------------------------
   PAYMENT WIDGET SECTION
   -------------------------------------------------------------------------- */
.payment-section {
    background: var(--payment-bg);
    border-radius: var(--payment-radius);
    box-shadow: var(--payment-shadow);
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid var(--payment-border);
}

.payment-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--payment-text);
    border-bottom: 1px solid var(--payment-border);
    padding-bottom: 15px;
}

.yookassa-widget-placeholder {
    min-height: 400px;
    background: var(--payment-bg-subtle);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--payment-border);
    color: var(--payment-text-muted);
    font-size: 16px;
    flex-direction: column;
    gap: 15px;
    height: auto;
}

#payment-form {
    width: 100%;
    min-height: 400px;
}

.yookassa-logo-placeholder {
    font-weight: 700;
    font-size: 24px;
    color: #000;
}

/* --------------------------------------------------------------------------
   REQUISITES
   -------------------------------------------------------------------------- */
.requisites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.requisite-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.requisite-label {
    font-size: 13px;
    color: var(--payment-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.requisite-value {
    font-size: 16px;
    color: var(--payment-text);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   ACCORDION (Legal Documents)
   -------------------------------------------------------------------------- */
.legal-docs {
    margin-top: 60px;
}

.accordion-item {
    background: var(--payment-bg);
    border-radius: var(--payment-radius);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--payment-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.accordion-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--payment-bg-subtle);
}

.accordion-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--payment-text);
}

.accordion-arrow {
    transition: transform 0.3s ease;
    color: var(--payment-text-muted);
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s;
    opacity: 0;
    background: var(--payment-bg-subtle);
}

.accordion-item.active .accordion-content {
    opacity: 1;
    border-top: 1px solid var(--payment-border);
}

.legal-text {
    padding: 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--payment-text);
    white-space: normal;
}

.legal-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--payment-text);
}

.legal-text h3:first-child {
    margin-top: 0;
}

.legal-text p {
    margin-bottom: 0.8em;
}

.legal-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .payment-section {
        padding: 24px 20px;
    }
}

/* --------------------------------------------------------------------------
   WIDGET & FORM CONTAINERS
   -------------------------------------------------------------------------- */
.payment-widget-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.payment-order-info {
    text-align: center;
    margin-top: 15px;
    color: #64748b;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.payment-order-desc {
    margin-bottom: 5px;
}

.payment-order-amount {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

/* --------------------------------------------------------------------------
   MANUAL PAYMENT FORM
   -------------------------------------------------------------------------- */
.manual-payment-wrapper {
    max-width: 440px;
    margin: 40px auto;
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
    /* Fix for layout */
}

.manual-payment-form {
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
    /* Ensure full width relative to wrapper */
}

.payment-logo-center {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 24px;
}

.payment-error-msg {
    color: red;
    margin-bottom: 10px;
    text-align: center;
}

.payment-label {
    font-weight: 500;
    display: block;
    /* Ensure label takes full width line */
}

.payment-input {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    /* CRITICAL FIX: prevents padding from expanding width */
}

/* Specific spacing for email input if needed differently, adhering to original styles */
.payment-input-email {
    margin-bottom: 22px;
}

.payment-submit-btn {
    width: 100%;
    background: #FFD93D;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.payment-secure-note {
    text-align: center;
    margin-top: 12px;
    color: #6b7280;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   OFFER & LINKS
   -------------------------------------------------------------------------- */
.offer-link-wrapper {
    margin-top: 10px;
}

.offer-link {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.4);
    transition: all 0.2s;
}

.offer-link:hover {
    color: #4682b4;
    border-color: transparent;
}

.back-to-payment-wrapper {
    margin-top: 30px;
    text-align: center;
}

.back-to-payment-btn {
    text-decoration: none;
    display: inline-block;
    width: auto;
    padding: 10px 30px;
}

/* --------------------------------------------------------------------------
   COPY BADGE
   -------------------------------------------------------------------------- */
.copy-badge-wrapper {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    /* For feedback positioning if needed */
}

.copy-feedback {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 12px;
    color: green;
    margin-left: 5px;
}