/** Moyasar Admin CSS */

.moyasar-admin-wrapper {
    /* background: #fff; */
    border: 1px solid #dcdcde;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-top: 20px;
    overflow: hidden;
}

.moyasar-admin-navbar {
    margin: 0 -30px 24px 0px !important;
}

.moyasar-header {
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.moyasar-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    padding: 0 !important;
}

.moyasar-desc {
    font-size: 14px;
    color: #646970;
    margin: 0;
    line-height: 1.5;
}

/* Tabs */
.moyasar-nav-tabs {
    padding: 0 24px !important;
    background: #fcfcfc;
    border-bottom: 1px solid #c3c4c7 !important;
    margin-bottom: 0 !important;
    display: flex;
    gap: 24px;
}

.moyasar-nav-tabs .nav-tab {
    font-size: 14px;
    padding: 16px 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #646970;
    margin: 0;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.moyasar-nav-tabs .nav-tab:hover {
    color: #135e96;
    background: transparent;
}

.moyasar-nav-tabs .nav-tab-active,
.moyasar-nav-tabs .nav-tab-active:hover {
    border-bottom: 2px solid #2271b1;
    /* WordPress Primary Blue */
    color: #1d2327;
    background: transparent !important;
}

.moyasar-nav-tabs .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    color: inherit;
}

/* Content Area */
.moyasar-settings-container {
    padding: 32px 40px;
    /* background: #fff; */
}

.moyasar-section-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 15px;
}

.moyasar-section-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.moyasar-section-header p {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

/* Form Styles */
.moyasar-tab-content .form-table {
    margin-top: 0;
    width: 100%;
    border-collapse: collapse;
}

.moyasar-tab-content .form-table th {
    width: 200px;
    padding: 20px 20px 20px 0;
    font-weight: 600;
    color: #1d2327 !important;
    /* Force color */
    vertical-align: top;
    display: table-cell !important;
    /* Force display */
    text-align: left;
}

.moyasar-tab-content .form-table td {
    padding: 20px 0;
}

/* Inputs */
.moyasar-tab-content input[type="text"],
.moyasar-tab-content input[type="password"],
.moyasar-tab-content input[type="email"],
.moyasar-tab-content input[type="number"],
.moyasar-tab-content textarea,
.moyasar-tab-content select {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0 12px;
    min-height: 40px;
    line-height: normal;
    font-size: 14px;
    color: #2c3338;
    box-shadow: 0 0 0 transparent;
    transition: box-shadow .1s linear;
    max-width: 480px;
    width: 100%;
}

.moyasar-tab-content textarea {
    padding: 12px;
    min-height: 100px;
}

.moyasar-tab-content input:focus,
.moyasar-tab-content textarea:focus,
.moyasar-tab-content select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

/* Checkboxes */
.moyasar-tab-content input[type="checkbox"] {
    border: 1px solid #8c8f94;
    border-radius: 2px;
    background: #fff;
    color: #2271b1;
    clear: none;
    cursor: pointer;
    display: inline-block;
    line-height: 0;
    height: 20px;
    margin: -4px 4px 0 0;
    outline: 0;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
    width: 20px;
    min-width: 20px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
    transition: .05s border-color ease-in-out;
}

.moyasar-tab-content input[type="checkbox"]:checked::before {
    content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%232271b1%27%2F%3E%3C%2Fsvg%3E");
    margin: -1px;
}

/* Preview Box */
.moyasar-preview-box {
    margin-top: 40px;
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
}

.moyasar-preview-box h4 {
    margin: 0 0 16px 0;
    color: #1d2327;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.moyasar-btn-preview {
    background: #fff;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.moyasar-btn-preview .button {
    transition: all 0.2s;
}

.moyasar-btn-preview .description {
    margin-top: 16px;
    font-style: italic;
    color: #8c8f94;
}

/* Descriptions */
.description {
    color: #646970;
    font-size: 13px;
    margin-top: 8px;
    display: block;
}

.wc-enhanced-select {
    width: 100% !important;
    max-width: 480px;
}

.moyasar-header {
    background: #fdfdfd;
    padding: 20px 24px;
    border-bottom: 1px solid #eaeaea;
}

.moyasar-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 20px;
    color: #333;
    padding: 0 !important;
}

.moyasar-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Tabs */
.moyasar-nav-tabs {
    padding: 0 20px !important;
    background: #fdfdfd;
    border-bottom: 1px solid #ccc !important;
    margin-bottom: 0 !important;
}

.moyasar-nav-tabs .nav-tab {
    font-size: 14px;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #555;
    margin-right: 20px;
    margin-left: 0;
    transition: all 0.2s ease;
}

.moyasar-nav-tabs .nav-tab:hover {
    color: #000;
    background: transparent;
}

.moyasar-nav-tabs .nav-tab-active {
    border-bottom: 2px solid #000;
    /* Primary Color */
    color: #000;
    background: transparent !important;
    border-top: none;
    border-left: none;
    border-right: none;
}

.moyasar-nav-tabs .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

/* Content */
.moyasar-settings-container {
    padding: 24px 30px;
}

.moyasar-section-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.moyasar-section-header h3 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.moyasar-section-header p {
    margin: 0;
    color: #777;
    font-size: 13px;
}

/* Form Table Overrides */
.moyasar-tab-content .form-table th {
    width: 250px;
    padding: 20px 10px 20px 0;
    font-weight: 500;
    color: #444;
}

.moyasar-tab-content .form-table td {
    padding: 15px 10px;
}

/* Toggle Switches for Checkboxes (Optional Enhancement) */
/* .moyasar-method-toggle + .description { ... } */

/* Preview Box */
.moyasar-preview-box {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
}

.moyasar-preview-box h4 {
    margin-top: 0;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2271b1;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2271b1;
}

input:checked+.slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Round Slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Ensure table cells align vertically center */
.wc_gateways td {
    vertical-align: middle !important;
}

.wc_gateways .name strong {
    font-size: 14px;
    color: #1d2327;
}

/* Payment Method Grid Layout */
.moyasar-method-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* 2x2 Grid for Card Payment */
.moyasar-icons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: fit-content;
}

.moyasar-icons-grid img {
    width: 42px;
    height: 30px;
    object-fit: contain;
    border: 1px solid #f0f0f1;
    border-radius: 4px;
    background: #fff;
    padding: 3px;
}

/* Single/Row Icons */
.moyasar-icons-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.moyasar-icons-row img {
    /* height: 40px; */
    /* Consistent height for row icons */
    width: auto;
    object-fit: contain;
}

.moyasar-icon-fixed img {
    width: 104px;
    height: 80px;
}

.moyasar-method-label {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    margin-top: 4px;
}

.moyasar-method-desc {
    font-size: 13px;
    color: #646970;
    margin-top: 2px;
}

/* Split Layout (Stripe-like) */
.moyasar-split-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.moyasar-layout-info {
    width: 280px;
    flex-shrink: 0;
    padding-top: 20px;
}

.moyasar-layout-info h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px 0;
}

.moyasar-layout-info p {
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
    margin: 0;
}

.moyasar-layout-card {
    flex-grow: 1;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.moyasar-layout-card .form-table {
    margin: 0;
}

/* Feature Badges */
.moyasar-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    background-color: #f0f0f1;
    color: #646970;
    border: 1px solid #dcdcde;
}

.moyasar-badge-green {
    background-color: #f6ffed;
    /* Lighter green */
    color: #135200;
    border-color: #b7eb8f;
}

.moyasar-badge svg {
    margin-right: 4px;
    fill: currentColor;
    width: 12px;
    height: 12px;
}