.ao-box {
    max-width: 420px;
    margin: 20px auto;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    direction: rtl;
    font-family: system-ui, sans-serif;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.ao-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #0f172a;
}

.ao-field label,
.ao-section label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #1e293b;
}

.ao-form select,
.ao-form input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
    color: #0f172a;
}

.ao-form select:focus,
.ao-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.4);
}

.ao-greg-section,
.ao-hijri-section {
    margin-top: 10px;
    display: none;
}

.ao-greg-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.ao-greg-row input {
    flex: 1;
}

.ao-greg-row input:last-child {
    flex: 1.4;
}

.ao-hijri-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.ao-hijri-row input {
    flex: 1;
}

.ao-submit {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37,99,235,0.25);
    transition: 0.15s ease;
}

.ao-submit:hover {
    opacity: 0.95;
}

.ao-submit:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.ao-error {
    margin-top: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 14px;
}

.ao-result-box {
    margin-top: 15px;
}

.ao-result {
    margin-top: 5px;
    padding: 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.ao-result h3 {
    margin-top: 10px;
    font-size: 16px;
    margin-bottom: 6px;
    color: #0f172a;
}

.ao-result p {
    margin: 4px 0;
    font-size: 14px;
    color: #334155;
}

.ao-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ao-tab-button {
    flex: 1;
    min-width: 48%;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 30px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    color: #2563eb;
}

.ao-tab-button-active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    border-color: transparent;
}

.ao-tab-content {
    display: none;
}

.ao-tab-active {
    display: block;
}

.ao-calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.ao-calendar-cell {
    padding: 10px 6px;
    text-align: center;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

.ao-calendar-today {
    background: #dbeafe;
    border-color: #60a5fa;
}

.ao-cal-h {
    font-weight: 700;
    font-size: 14px;
    color: #1d4ed8;
}

.ao-cal-g {
    font-size: 10px;
    color: #64748b;
}

.ao-widget-wrapper .ao-box {
    max-width: 100%;
    padding: 15px;
    box-shadow: none;
}

.ao-loading {
    width: 26px;
    height: 26px;
    border: 3px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ao-spin 0.7s linear infinite;
    margin: 10px auto 0;
    display: none;
}

@keyframes ao-spin {
    to {
        transform: rotate(360deg);
    }
}

.ao-fade {
    opacity: 0;
    transform: translateY(5px);
    transition: 0.3s ease;
}

.ao-fade-show {
    opacity: 1;
    transform: translateY(0);
}

.ao-success {
    margin-top: 10px;
    background: #d1fae5;
    color: #065f46;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}