/* 배송 폼 화면 스타일 */
.shipping-form-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.shipping-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    flex: 1;
    text-align: center;
}

.progress-step {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.progress-step.active {
    color: var(--white);
    font-weight: 600;
}

/* 상품 요약 */
.items-summary {
    margin: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.toggle-items-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-items-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* 상품 리스트 */
.items-list {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shipping-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.shipping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shipping-item .item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.shipping-item .item-icon.grade-1 {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.shipping-item .item-icon.grade-2 {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.3), rgba(255, 217, 61, 0.1));
    border: 1px solid rgba(255, 217, 61, 0.5);
}

.shipping-item .item-icon.grade-3 {
    background: linear-gradient(135deg, rgba(107, 207, 127, 0.3), rgba(107, 207, 127, 0.1));
    border: 1px solid rgba(107, 207, 127, 0.5);
}

.shipping-item .item-icon.grade-4 {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.5);
}

.shipping-item .item-icon.grade-5 {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.3), rgba(149, 165, 166, 0.1));
    border: 1px solid rgba(149, 165, 166, 0.5);
}

.shipping-item .item-details {
    flex: 1;
}

.shipping-item .item-name {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.shipping-item .item-grade {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
}

.shipping-item .item-value {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
}

/* 요약 정보 */
.summary-info {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row.highlight {
    background: rgba(255, 255, 255, 0.1);
    margin: 8px -8px 0;
    padding: 12px 8px;
    border-radius: var(--border-radius);
    border: none;
}

.info-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.info-value {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.info-value.free {
    color: #2ecc71;
    font-weight: 700;
}

/* 배송 폼 */
.shipping-form {
    flex: 1;
    padding: 0 20px 20px;
}

.form-section {
    margin-bottom: 24px;
}

.section-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 폼 요소 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 16px;
    color: var(--dark-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-gradient-end);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #e74c3c;
    background: rgba(255, 255, 255, 0.95);
}

.form-input[readonly] {
    background: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-select {
    cursor: pointer;
}

.form-error {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    padding-left: 4px;
}

/* 입력 그룹 */
.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-input {
    flex: 1;
}

.address-search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.address-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 글자 수 표시 */
.char-count {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin-top: 4px;
}

/* 동의 체크박스 */
.consent-group,
.save-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.consent-label,
.save-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.consent-checkbox,
.save-checkbox {
    display: none;
}

.consent-checkmark,
.save-checkmark {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.consent-checkbox:checked + .consent-checkmark,
.save-checkbox:checked + .save-checkmark {
    background: var(--primary-gradient-end);
    border-color: var(--primary-gradient-end);
}

.consent-checkbox:checked + .consent-checkmark::after,
.save-checkbox:checked + .save-checkmark::after {
    content: '✓';
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.consent-text,
.save-text {
    color: var(--white);
    font-size: 14px;
    line-height: 1.4;
}

.privacy-detail-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 6px 12px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.privacy-detail-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 제출 버튼 */
.form-actions {
    margin-top: 32px;
}

.submit-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 개인정보 모달 */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    color: var(--dark-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: var(--dark-color);
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.privacy-content {
    color: var(--dark-color);
    line-height: 1.6;
}

.privacy-section {
    margin-bottom: 24px;
}

.privacy-section h4 {
    color: var(--dark-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.privacy-section ul {
    margin: 0;
    padding-left: 20px;
}

.privacy-section li {
    margin-bottom: 4px;
    color: #666;
    font-size: 14px;
}

.privacy-section p {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.modal-btn.btn-secondary:hover {
    background: #e9ecef;
}

.modal-btn.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--white);
}

.modal-btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .shipping-header {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .shipping-title {
        font-size: 18px;
        text-align: center;
    }
    
    .items-summary {
        margin: 16px;
    }
    
    .summary-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .toggle-items-btn {
        justify-content: center;
    }
    
    .shipping-items {
        padding: 16px;
        gap: 8px;
    }
    
    .shipping-item {
        padding: 8px;
    }
    
    .shipping-item .item-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .summary-info {
        padding: 16px;
    }
    
    .shipping-form {
        padding: 0 16px 16px;
    }
    
    .form-section {
        margin-bottom: 20px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* iOS 줌 방지 */
        padding: 10px 14px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .address-search-btn {
        padding: 10px 14px;
    }
    
    .consent-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .privacy-detail-btn {
        align-self: flex-start;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 375px) {
    .shipping-header {
        padding: 12px;
    }
    
    .items-summary {
        margin: 12px;
    }
    
    .shipping-form {
        padding: 0 12px 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .shipping-item .item-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .shipping-item .item-name {
        font-size: 13px;
    }
    
    .shipping-item .item-grade {
        font-size: 10px;
    }
    
    .shipping-item .item-value {
        font-size: 11px;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    .submit-btn,
    .address-search-btn,
    .privacy-detail-btn,
    .modal-btn,
    .toggle-items-btn {
        transition: none !important;
        transform: none !important;
    }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .shipping-form-screen {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .modal-content {
        background: #2c3e50;
        color: var(--white);
    }
    
    .modal-header {
        border-bottom-color: #34495e;
    }
    
    .modal-footer {
        border-top-color: #34495e;
    }
    
    .privacy-content {
        color: var(--white);
    }
    
    .privacy-section h4 {
        color: var(--white);
    }
    
    .privacy-section li,
    .privacy-section p {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .modal-close:hover {
        background: #34495e;
        color: var(--white);
    }
    
    .modal-btn.btn-secondary {
        background: #34495e;
        color: var(--white);
        border-color: #4a5f7a;
    }
    
    .modal-btn.btn-secondary:hover {
        background: #4a5f7a;
    }
}