/* 주문 페이지 스타일 */
.order-form {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 120px; /* 하단 고정 버튼 공간 확보 */
}

.order-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.order-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.url-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.url-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.url-group-number {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.btn-remove-url {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-remove-url:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.btn-add-url {
    width: 100%;
    padding: 1rem;
    background: rgba(107, 226, 255, 0.1);
    border: 2px dashed rgba(107, 226, 255, 0.3);
    border-radius: 12px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-add-url:hover {
    background: rgba(107, 226, 255, 0.15);
    border-color: rgba(107, 226, 255, 0.5);
}

.price-info {
    background: linear-gradient(135deg, rgba(70, 116, 255, 0.1), rgba(5, 195, 255, 0.1));
    border: 1px solid rgba(107, 226, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.price-info-title {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.price-info-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.price-detail {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.price-notice {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: rgba(251, 191, 36, 0.9);
}

/* 주문 요약 - 하단 고정 */
.order-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(107, 226, 255, 0.3);
    padding: 1rem;
    margin: 0;
    z-index: 1000;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.order-summary-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.summary-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 80px;
    flex: 0 0 auto;
}

.summary-spacer {
    flex: 1;
}

.summary-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.summary-value {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.summary-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.summary-total .summary-label {
    font-size: 0.8rem;
}

.summary-total .summary-value {
    color: var(--accent);
    font-size: 1.5rem;
}

.order-summary-buttons {
    display: flex;
    gap: 1rem;
}

.btn-order {
    padding: 1rem 2.5rem;
    background: linear-gradient(120deg, #4674ff 0%, #05c3ff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
}

.btn-order-preset {
    background: rgba(52, 211, 153, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #34d399;
}

.btn-order:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(70, 116, 255, 0.5);
}

.btn-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-cancel {
    padding: 1rem 2.5rem;
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.4);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 180px;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    align-items: center;
}

.form-actions .btn-order,
.form-actions .btn-cancel {
    flex: 1;
    max-width: 300px;
}

.help-text {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

.date-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* 주문 페이지 전용 입력 필드 스타일 개선 */
.order-form .form-group {
    margin-bottom: 2rem;
}

.order-form .form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.order-form .form-input,
.order-form select,
.order-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.order-form .form-input:focus,
.order-form select:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 141, 240, 0.1);
}

.error-rate-info {
    background: rgba(107, 226, 255, 0.05);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    border-radius: 4px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .order-form {
        max-width: 100%;
        padding-bottom: 200px; /* 모바일에서 플로팅 바로 인한 가림 방지 */
    }

    .form-row,
    .date-range-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .order-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .order-section-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .url-group {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .url-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .btn-remove-url {
        width: 100%;
        padding: 0.6rem;
    }

    .order-form .form-group {
        margin-bottom: 1.5rem;
    }

    .order-form .form-input,
    .order-form select,
    .order-form textarea {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .price-info {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .price-info-amount {
        font-size: 1.5rem;
    }

    /* 하단 고정 요약 모바일 최적화 - 더 콤팩트하게 */
    .order-summary {
        padding: 0.75rem 1rem;
    }

    .order-summary-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .summary-item {
        flex: 0 0 auto;
        min-width: fit-content;
        white-space: nowrap;
    }

    .summary-item .summary-label {
        display: inline;
        margin-right: 0.25rem;
    }

    .summary-item .summary-value {
        display: inline;
    }

    .summary-total {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        background: rgba(107, 226, 255, 0.1);
        border-radius: 8px;
    }

    .summary-total .summary-label {
        font-size: 0.85rem;
    }

    .summary-total .summary-value {
        font-size: 1.1rem;
        font-weight: 700;
    }

    .order-summary-buttons {
        flex: 0 0 100%;
        display: flex;
        gap: 0.75rem;
    }

    .btn-order {
        flex: 1;
        padding: 0.875rem;
        font-size: 1rem;
        min-width: 120px;
    }

    .btn-cancel {
        padding: 0.875rem;
        font-size: 1rem;
        min-width: 120px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-order,
    .form-actions .btn-cancel {
        width: 100%;
        max-width: none;
    }

    .help-text {
        font-size: 0.8rem;
    }

    .price-notice {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .order-form {
        padding-bottom: 140px; /* 플로팅 바 높이 감소로 공간 줄임 */
    }

    .order-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .order-section-title {
        font-size: 1rem;
    }

    .url-group {
        padding: 1rem;
    }

    .url-group-number {
        font-size: 1rem;
    }

    .order-form .form-input,
    .order-form select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    /* 더 작은 화면에서 더욱 콤팩트하게 */
    .order-summary {
        padding: 0.6rem 0.75rem;
    }

    .summary-info {
        gap: 0.4rem;
        font-size: 0.85rem;
    }

    .summary-item {
        font-size: 0.8rem;
    }

    .summary-label {
        font-size: 0.7rem;
    }

    .summary-value {
        font-size: 0.85rem;
    }

    .summary-total {
        padding: 0.4rem 0.6rem;
    }

    .summary-total .summary-label {
        font-size: 0.8rem;
    }

    .summary-total .summary-value {
        font-size: 1rem;
    }

    .btn-order {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

/* Success Modal */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-modal {
    background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(107,226,255,0.1));
    border: 2px solid var(--accent);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.success-modal-message {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.success-modal-order-id {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(107,226,255,0.1);
    border-radius: 12px;
}

.success-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.success-modal-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.success-modal-btn-primary {
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    color: white;
}

.success-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107,226,255,0.3);
}

.success-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.success-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
    .success-modal {
        padding: 2rem 1.5rem;
    }

    .success-modal-title {
        font-size: 1.5rem;
    }

    .success-modal-order-id {
        font-size: 1.5rem;
    }

    .success-modal-actions {
        flex-direction: column;
    }
}
