/* Reset and base styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: #000;
    background: radial-gradient(circle, #e5e5e5 1px, rgba(0, 0, 0, 0) 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 610px;
    margin: 0 auto;
}

/* Card styles - Notion/shadcn inspired */
.card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.card-header h1 {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Payment card specific styles */
.payment-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 20px;
}

.payment-header {
    padding: 32px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fbfbfb;
}

.payment-header h1 {
    font-size: clamp(25px, 10px + 2.5vw, 30px);
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
    margin-bottom: .5rem;
}

.payment-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-number, .order-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.order-amount {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.order-amount .label {
    align-self: flex-start;
}

.order-amount .detail-value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 640px) {
    .order-amount .detail-value-container {
        align-items: flex-start;
    }
}

.order-number .label, .order-amount .label {
    font-weight: 500;
    color: #6b7280;
}

.order-number .value {
    font-weight: 700;
    color: #1f2937;
    font-size: 18px;
}

.order-amount .value {
    font-weight: 700;
    color: #1f2937;
    font-size: 18px;
    font-family: "Inter", sans-serif;
}

/* Form styles - Notion/shadcn inspired */
.form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.15s ease;
    background: white;
    color: #0f172a;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgb(15 23 42 / 10%);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Radio button styles - Notion/shadcn inspired */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.radio-button {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: white;
}

.radio-button:hover {
    border-color: #9ca3af;
    background: #f8fafc;
}

.radio-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button input[type="radio"]:checked + .radio-content {
    color: #0f172a;
}

.radio-button input[type="radio"]:checked {
    box-shadow: 0 0 0 1px rgb(15 23 42);
}

.radio-button:has(input[type="radio"]:checked) {
    border-color: #0f172a;
    background: #fafafa;
    box-shadow: 0 0 0 1px rgb(15 23 42);
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.radio-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.radio-subtitle {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
    line-height: 1.3;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

/* Input with button container */
.input-with-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

/* Paste button styles */
.paste-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    min-height: 40px;
}

.paste-btn:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
}

.paste-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.paste-btn .paste-text {
    display: inline;
}

/* Hide text on mobile devices */
@media (max-width: 639px) {
    .paste-btn .paste-text {
        display: none;
    }
    
    .paste-btn {
        min-width: 40px;
        padding: 10px 12px;
    }
}

/* Button styles - Notion/shadcn inspired */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 40px;
    font-family: inherit;
    line-height: 1.4;
}

.btn-link {
    background: transparent;
    color: #3030DB;
    box-shadow: none;
    padding: 0.5rem 0;
    text-decoration: underline;
    -webkit-text-decoration-style: dotted;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.btn-primary {
    background: #0f172a;
    color: white;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #1e293b;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn-success {
    width: 100%;
    background: #10b981;
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Payment details */
.payment-details {
    padding: 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.payment-details h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #fbfbfb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.detail-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.detail-value-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-value {
    flex: 1;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #1f2937;
    word-break: break-all;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Скрываем текст на больших экранах */
.copy-btn .copy-text {
    display: none;
}

/* Показываем текст на мобильных устройствах */
@media (max-width: 639px) {
    .copy-btn {
        width: auto;
        min-width: 100px;
        padding: 8px 16px;
    }
    
    .copy-btn .copy-text {
        display: inline;
        margin-left: 6px;
        font-size: 14px;
        font-weight: 500;
    }
}

.copy-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Payment instructions */
.payment-instructions {
    margin: 24px 24px 0 24px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #dbfce7;
    color: #232323;
    line-height: 1.3;
}

.payment-instructions h3 {
    font-size: 18px;
    font-weight: 600;
    color: #232323;
}

.payment-instructions ul {
    list-style: none;
    padding: 0;
}

.payment-instructions li {
    padding: 8px 0;
    position: relative;
    padding-left: 16px;
}

.payment-instructions li::before {
    content: "•";
    color: red;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Payment confirmation */
.payment-confirmation {
    padding: 32px 24px;
    text-align: center;
}

.payment-confirmation p {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 24px;
    font-weight: 500;
}

.confirmation-form {
    margin: 0;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 32px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.back-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    margin-top: 12px;
    display: inline-block;
}

.back-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Animation for copy button */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-btn.copied {
    background: #10b981;
    animation: copySuccess 0.3s ease;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus styles for accessibility */
.btn:focus,
.copy-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Стили для скрытия элементов после успешной отправки */
.payment-details,
.payment-instructions,
.payment-attachment,
.payment-confirmation,
.payment-footer {
    transition: opacity 0.3s ease;
}

.payment-details.hidden,
.payment-instructions.hidden,
.payment-attachment.hidden,
.payment-confirmation.hidden,
.payment-footer.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Modal styles - Notion/shadcn inspired */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: #fff;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.text-center {
    text-align: center;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.font-bold {
    font-weight: 600;
}

.text-muted-foreground {
    color: #64748b;
}

.w-full {
    width: 100%;
}

.h-10 {
    height: 2.5rem;
}

.hidden {
    display: none;
}

.text-destructive {
    color: #ef4444;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .card, .payment-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .copy-btn {
        display: none;
    }
    
    .back-link {
        display: none;
    }
}

/* File upload styles */
.payment-attachment {
    padding: 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.payment-attachment h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.payment-attachment p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.file-upload-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    min-height: 48px;
}

.file-upload-label:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.file-upload-label.has-file {
    border-color: #10b981;
    border-style: solid;
    background: #f0fdf4;
    color: #059669;
}

.file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    background: #fbfbfb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #747a83;
}

.file-info.hidden {
    display: none;
}


/* Loading animation for submit button */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }
    
    .card-header, .payment-header, .form, .payment-details, .payment-confirmation, .payment-attachment {
        padding: 24px 16px;
    }
    
    .order-info {
        gap: 8px;
    }
    
    .order-number, .order-amount {
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .order-number .value, .order-amount .value {
        font-size: 20px;
    }
    
    .detail-item {
        padding: 16px 8px;
    }
    
    .detail-value-container {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .copy-btn {
        width: 100%;
        height: 36px;
        min-width: 100px;
        padding: 8px 16px;
    }
    
    .copy-btn .copy-text {
        display: inline;
        margin-left: 6px;
        font-size: 14px;
        font-weight: 500;
    }
    
    /* Radio buttons on mobile */
    .radio-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .radio-button {
        padding: 12px;
    }
    
    .radio-title {
        font-size: 14px;
    }
    
    .radio-subtitle {
        font-size: 11px;
    }
    .payment-instructions {
        margin: 16px 16px 0 16px;
        padding: 16px 8px;
    }
}
