/**
 * Union Attachments Order - Frontend Styles
 */

.uao-order-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

/* RTL Support */
.uao-order-container * {
    direction: rtl;
}

.uao-order-container .uao-item-info,
.uao-order-container .uao-form-row label,
.uao-order-container .uao-selected-item-preview {
    text-align: right;
}

.uao-main-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

/* Category Sections */
.uao-category-section {
    margin-bottom: 50px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.uao-category-title {
    font-size: 24px;
    color: #0073aa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    text-align: right;
    font-weight: bold;
}

.uao-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.uao-item-box {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.uao-item-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.uao-item-box.selected {
    border-color: #5cb85c;
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
}

.uao-item-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.uao-item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.uao-item-box:hover .uao-item-image {
    transform: scale(1.05);
}

.uao-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(92, 184, 92, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.uao-item-box.selected .uao-item-overlay {
    display: flex;
}

.uao-selected-badge {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
}

.uao-item-info {
    padding: 15px;
    text-align: center;
}

.uao-item-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.uao-item-price {
    font-size: 20px;
    color: #0073aa;
    font-weight: bold;
    margin: 10px 0;
}

.uao-item-category {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}

.uao-selected-items-section {
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.uao-selected-items-section h3 {
    margin-top: 0;
    color: #333;
}

#uao-selected-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.uao-selected-item-preview {
    border: 2px solid #5cb85c;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    flex-direction: row-reverse;
    direction: rtl;
}

.uao-selected-item-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.uao-order-form-section {
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.uao-order-form-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.uao-form-row {
    margin-bottom: 20px;
}

.uao-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.uao-form-row .required {
    color: #d63638;
}

.uao-form-row input[type="text"],
.uao-form-row input[type="tel"],
.uao-form-row textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    max-width: 100%;
    box-sizing: border-box;
    text-align: right;
    direction: rtl;
}

.uao-form-row input:focus,
.uao-form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.uao-submit-order-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
}

.uao-submit-order-btn:hover {
    background: #005a87;
}

.uao-submit-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.uao-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.uao-form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.uao-form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .uao-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .uao-order-container {
        padding: 15px;
    }
    
    .uao-order-form-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .uao-items-grid {
        grid-template-columns: 1fr;
    }
    
    .uao-main-title {
        font-size: 1.5em;
    }
    
    .uao-category-section {
        padding: 15px;
    }
    
    .uao-category-title {
        font-size: 20px;
    }
}

