/**
 * EK Return Center - Frontend Styles
 */

/* Container */
.ekrc-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.ekrc-header {
    text-align: center;
    margin-bottom: 40px;
}

.ekrc-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.ekrc-header p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Steps */
.ekrc-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}

.ekrc-step {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 14px;
}

.ekrc-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eee;
    color: #999;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.15s ease;
}

.ekrc-step.active .ekrc-step-number {
    background: #333;
    color: #fff;
}

.ekrc-step.completed .ekrc-step-number {
    background: #333;
    color: #fff;
}

.ekrc-step-line {
    width: 40px;
    height: 1px;
    background: #ddd;
    margin: 0 15px;
}

/* Form Sections */
.ekrc-section {
    display: none;
}

.ekrc-section.active {
    display: block;
}

/* Card */
.ekrc-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

/* Form Fields */
.ekrc-field {
    margin-bottom: 20px;
}

.ekrc-field:last-child {
    margin-bottom: 0;
}

.ekrc-field label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.ekrc-field input[type="text"],
.ekrc-field input[type="email"],
.ekrc-field input[type="number"],
.ekrc-field select,
.ekrc-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.15s ease;
}

.ekrc-field input:focus,
.ekrc-field select:focus,
.ekrc-field textarea:focus {
    outline: none;
    border-color: #333;
}

.ekrc-field textarea {
    resize: vertical;
    min-height: 120px;
}

.ekrc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ekrc-field-row {
        grid-template-columns: 1fr;
    }
}

/* Order Info */
.ekrc-order-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 25px;
}

.ekrc-order-info-item {
    font-size: 14px;
}

.ekrc-order-info-item strong {
    display: block;
    color: #666;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ekrc-order-info-item span {
    color: #333;
    font-weight: 500;
}

/* Items List */
.ekrc-items-list {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ekrc-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
}

.ekrc-item:last-child {
    border-bottom: none;
}

.ekrc-item:hover {
    background: #fafafa;
}

.ekrc-item-checkbox {
    flex-shrink: 0;
}

.ekrc-item-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ekrc-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.ekrc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ekrc-item-details {
    flex: 1;
    min-width: 0;
}

.ekrc-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.ekrc-item-meta {
    font-size: 13px;
    color: #666;
}

.ekrc-item-qty {
    flex-shrink: 0;
    width: 80px;
}

.ekrc-item-qty select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Photo Upload */
.ekrc-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ekrc-upload-area:hover {
    border-color: #999;
    background: #fafafa;
}

.ekrc-upload-area.dragging {
    border-color: #333;
    background: #f5f5f5;
}

.ekrc-upload-icon {
    font-size: 40px;
    color: #999;
    margin-bottom: 10px;
}

.ekrc-upload-text {
    color: #666;
    font-size: 14px;
}

.ekrc-upload-text strong {
    color: #333;
}

.ekrc-upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.ekrc-upload-input {
    display: none;
}

/* Photo Preview */
.ekrc-photos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.ekrc-photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.ekrc-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ekrc-photo-preview.uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
}

.ekrc-photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ekrc-photo-preview:hover .ekrc-photo-remove {
    opacity: 1;
}

/* Checkbox Agreement */
.ekrc-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}

.ekrc-checkbox-field input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.ekrc-checkbox-label {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* Buttons */
.ekrc-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.ekrc-btn {
    padding: 14px 30px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.ekrc-btn-primary {
    background: #333;
    color: #fff;
}

.ekrc-btn-primary:hover {
    background: #000;
}

.ekrc-btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.ekrc-btn-secondary:hover {
    background: #f5f5f5;
}

.ekrc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ekrc-btn-full {
    width: 100%;
}

/* Success */
.ekrc-success {
    text-align: center;
    padding: 40px 20px;
}

.ekrc-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 40px;
    color: #333;
}

.ekrc-success h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px;
}

.ekrc-success p {
    color: #666;
    font-size: 15px;
    margin: 0 0 10px;
}

.ekrc-success-number {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    color: #333;
    margin-top: 10px;
}

/* Error Message */
.ekrc-error {
    padding: 15px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Loading */
.ekrc-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes ekrc-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ekrc-section.active {
    animation: ekrc-fade-in 0.3s ease;
}

/* Order List (logged-in users) */
.ekrc-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.ekrc-order-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ekrc-order-card:hover {
    border-color: #999;
    background: #fafafa;
}

.ekrc-order-card.selected {
    border-color: #333;
    background: #f5f5f5;
}

.ekrc-order-radio {
    flex-shrink: 0;
    padding-top: 2px;
}

.ekrc-order-radio input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ekrc-order-content {
    flex: 1;
    min-width: 0;
}

.ekrc-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ekrc-order-card .ekrc-order-number {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.ekrc-order-date {
    font-size: 13px;
    color: #666;
}

.ekrc-order-items {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ekrc-more {
    color: #999;
}

.ekrc-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ekrc-order-total {
    font-weight: 500;
    color: #333;
}

.ekrc-order-status {
    font-size: 12px;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 3px;
    color: #666;
}

/* No Orders */
.ekrc-no-orders {
    text-align: center;
    padding: 30px 20px;
}

.ekrc-no-orders-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.ekrc-no-orders h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 18px;
}

.ekrc-no-orders p {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    .ekrc-form-container {
        padding: 20px 15px;
    }

    .ekrc-header h1 {
        font-size: 22px;
    }

    .ekrc-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ekrc-step-line {
        display: none;
    }

    .ekrc-card {
        padding: 20px;
    }

    .ekrc-order-info {
        grid-template-columns: 1fr;
    }

    .ekrc-item {
        flex-wrap: wrap;
    }

    .ekrc-item-qty {
        width: 100%;
        margin-top: 10px;
    }

    .ekrc-buttons {
        flex-direction: column;
    }

    .ekrc-btn {
        width: 100%;
    }
}
