/* Omar Member Pro V3 - Frontend Styles */
.omar-v3-form-container {
    direction: rtl;
    text-align: right;
    max-width: 100%;
    width: 95%;
    margin: 20px auto;
    padding: 30px;
    /* Balanced padding on all sides */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
}

.omar-v3-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 Column Grid for Desktop */
    gap: 12px;
}

@media (max-width: 1200px) {
    .omar-v3-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .omar-v3-grid {
        grid-template-columns: 1fr;
    }

    .omar-v3-form-container {
        width: 98%;
        padding: 20px;
    }
}

.omar-v3-group {
    margin-bottom: 12px;
    /* Tighter vertical spacing */
    position: relative;
}

/* Master Grid Spans - Responsive */
.omar-v3-group.full-width {
    grid-column: span 4;
}

@media (max-width: 1200px) {
    .omar-v3-group.full-width {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .omar-v3-group.full-width {
        grid-column: span 1;
    }
}

.omar-v3-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--omar-v3-primary);
    font-size: 15px;
    border-right: 4px solid var(--omar-v3-secondary);
    padding-right: 12px;
}

.omar-v3-group input[type="text"],
.omar-v3-group input[type="number"],
.omar-v3-group input[type="email"],
.omar-v3-group select,
.omar-v3-group textarea {
    width: 100%;
    padding: 0 15px;
    /* Side padding only for fixed height */
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
    height: 48px;
    /* Slightly more compact */
    line-height: 48px;
}

/* Adjustments for select and textarea */
.omar-v3-group select {
    padding-top: 0;
    padding-bottom: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg%20xmlns="http://www.w3.org/2000/svg"%20width="24"%20height="24"%20viewBox="0%200%2024%2024"><path%20fill="%2364748b"%20d="M7%2010l5%205%205-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: left 15px center;
}

.omar-v3-group textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 15px;
    line-height: 1.6;
}

/* Read-only field styling */
.omar-v3-input-readonly {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569;
    cursor: not-allowed;
    font-weight: 500;
}

.omar-v3-field-notice {
    margin-top: 10px;
    margin-bottom: 20px;
    /* Added spacing */
    font-size: 13px;
    color: var(--omar-v3-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--omar-v3-secondary-rgb), 0.05);
    /* Lighter bg */
    padding: 10px 15px;
    border-radius: 8px;
    border-right: 4px solid var(--omar-v3-primary);
}

.omar-v3-group input:focus,
.omar-v3-group select:focus,
.omar-v3-group textarea:focus {
    outline: none;
    border-color: var(--omar-v3-primary);
    box-shadow: 0 0 0 3px rgba(var(--omar-v3-primary-rgb), 0.1);
}

/* Paragraphs */
.omar-v3-para-item {
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.omar-v3-para-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    /* Added spacing */
}

.omar-v3-btn-add,
.omar-v3-btn-remove {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}

.omar-v3-btn-remove {
    background: #ef4444;
}

/* File Input */
.omar-v3-file-wrapper {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.omar-v3-file-wrapper:hover {
    border-color: var(--omar-v3-primary);
    background: rgba(var(--omar-v3-primary-rgb), 0.05);
}

.omar-v3-file-wrapper input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.omar-v3-file-dummy .icon {
    font-size: 30px;
    display: block;
    margin-bottom: 8px;
}

.omar-v3-file-dummy .text {
    color: #64748b;
}

/* Footer & Buttons */
.omar-v3-footer {
    border-top: 1px solid #e2e8f0;
    padding: 10px 0 0 0;
    /* Only top padding */
    margin: 0;
    /* Zero margin */
    text-align: center;
}

.omar-v3-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 40px;
    border-radius: 10px;
    border: none;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--omar-v3-primary-rgb), 0.3);
}

.omar-v3-btn-submit .icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
    transform: scaleX(-1);
    /* Correct RTL direction for send icon */
}

.omar-v3-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--omar-v3-primary-rgb), 0.4);
}

.omar-v3-btn-submit:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Loader Spinner */
.omar-v3-btn-submit .loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.omar-v3-btn-submit.is-loading .icon {
    display: none;
}

.omar-v3-btn-submit.is-loading .loader {
    display: inline-block;
    margin-left: 10px;
}

.omar-v3-btn-submit.is-loading .text {
    display: inline-block;
}

/* Notices - Zero height when empty */
#omar-v3-msg:empty {
    display: none;
}

#omar-v3-msg {
    margin-top: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.omar-v3-notice-success {
    color: #10b981;
}

.omar-v3-notice-error {
    color: #ef4444;
}