@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

* {
    direction: rtl;
    text-align: right;
}

.fnoon-bulk-print-form {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #000000;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.fnoon-bulk-print-form h1 {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.phone-input-wrapper {
    display: flex;
    gap: 10px;
}

.phone-flag {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #000000;
    background: #ffffff;
    font-size: 20px;
}

.phone-input-wrapper input {
    flex: 1;
}



.product-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.product-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #000000;
    background: #ffffff;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.product-option input[type="radio"] {
    margin-left: 8px;
    cursor: pointer;
    width: auto;
}

.product-option span {
    flex: 1;
    text-align: right;
}

.product-option:hover {
    background: #f5f5f5;
}

.product-option input[type="radio"]:checked + span {
    font-weight: 700;
}

.product-option input[type="radio"]:checked {
    accent-color: #000000;
}

.upload-area {
    border: 2px dashed #000000;
    padding: 20px;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    position: relative;
}

.upload-area:hover {
    background: #f9f9f9;
    border-color: #333;
}

.upload-area.dragover {
    background: #f0f0f0;
    border-color: #333;
    transform: scale(1.02);
}

.upload-area.uploading {
    background: #f0f0f0;
    border-color: #666;
    cursor: wait;
}

.upload-area.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-area p {
    margin: 0;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
}

.uploaded-files {
    margin-top: 10px;
}

.uploaded-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #000000;
    margin-bottom: 5px;
    font-size: 13px;
}

.uploaded-file .remove-file {
    cursor: pointer;
    color: #000000;
    font-weight: 600;
    background: none;
    border: 1px solid #000;
    padding: 4px 8px;
    font-size: 12px;
    transition: all 0.3s;
}

.uploaded-file .remove-file:hover {
    background: #000;
    color: #fff;
}

.items-container {
    background: #f5f5f5;
    padding: 20px;
    border: 1px solid #000000;
    margin-bottom: 20px;
}

.item-card {
    background: #ffffff;
    padding: 15px;
    border: 1px solid #000000;
    margin-bottom: 15px;
}

.item-card:last-child {
    margin-bottom: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.remove-item {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    transition: all 0.3s;
}

.remove-item:hover {
    background: #000000;
    color: #ffffff;
}





.submit-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #000000;
    font-size: 14px;
}

.message.success {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.message.error {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #000000;
}

.loading.active {
    display: block;
}

.spinner {
    border: 2px solid #000000;
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #000000;
    margin-right: 8px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .fnoon-bulk-print-form {
        padding: 20px;
        margin: 20px 10px;
    }

    .fnoon-bulk-print-form h1 {
        font-size: 24px;
    }

    .phone-input-wrapper {
        flex-direction: row-reverse;
    }
}
