/* ZainPay Payment Gateway Styles */

.pgzw-payment-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pgzw-payment-options {
    margin-bottom: 20px;
}

.pgzw-payment-options label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.pgzw-payment-options input[type="radio"] {
    margin-right: 8px;
}

.pgzw-redirect-option {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.pgzw-inline-form {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    display: none;
}

.pgzw-inline-form.active {
    display: block;
}

.pgzw-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.pgzw-form-group {
    flex: 1;
}

.pgzw-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.pgzw-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.pgzw-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.pgzw-form-group input.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.1);
}



.pgzw-submit-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.pgzw-submit-button:hover {
    background: #005a87;
}

.pgzw-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pgzw-redirect-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.pgzw-redirect-button:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.pgzw-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    font-size: 14px;
}

.pgzw-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    font-size: 14px;
}

.pgzw-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: pgzw-spin 1s linear infinite;
    margin-right: 8px;
}

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

.pgzw-payment-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.pgzw-security-info {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.pgzw-security-info::before {
    content: "🔒";
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pgzw-form-row {
        flex-direction: column;
        gap: 10px;
    }
    

    
    .pgzw-payment-form {
        padding: 15px;
    }
}

/* WooCommerce Integration */
.woocommerce .pgzw-payment-form {
    margin: 0;
}

.woocommerce-checkout .pgzw-payment-form {
    background: transparent;
    border: none;
    padding: 0;
}

.payment_method_zainpay .pgzw-payment-form {
    margin-top: 15px;
}

/* Admin Styles */
.pgzw-admin-notice {
    border-left: 4px solid #0073aa;
    padding: 12px;
    margin: 15px 0;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.pgzw-admin-notice.notice-warning {
    border-left-color: #ffb900;
}

.pgzw-admin-notice.notice-error {
    border-left-color: #dc3232;
}

.pgzw-admin-notice.notice-success {
    border-left-color: #46b450;
}

.pgzw-settings-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.pgzw-settings-content {
    flex: 1;
    min-width: 0;
}

.pgzw-settings-sidebar {
    width: 280px;
    position: sticky;
    top: 50px;
    margin-top: 50px; 
    transform: none;
    align-self: flex-start;
}

.pgzw-settings-sidebar .postbox-container {
    width: 100%;
}

.pgzw-settings-sidebar .postbox {
    margin-bottom: 12px;
}

.pgzw-settings-sidebar .postbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #c3c4c7;
}

.pgzw-settings-sidebar .postbox-header .hndle {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
}

.pgzw-settings-sidebar .postbox-header .handle-actions {
    margin-left: 8px;
}

.pgzw-settings-sidebar .postbox-header .handlediv {
    width: 36px;
    height: 36px;
    font-size: 0;
}

.pgzw-settings-sidebar .postbox-header .toggle-indicator:before {
    font-size: 18px;
    line-height: 1;
}

.pgzw-settings-sidebar .postbox .inside {
    margin: 0;
}

.wp-core-ui .pgzw-settings-sidebar a.pgzw-link {
    display: block;
    margin-top: 10px;
    font-size: 1em;
}

.pgzw-settings-sidebar #postbox-container-1 .inside ul {
    margin-bottom: 20px;
}

.pgzw-settings-sidebar #postbox-container-1 .inside ul li {
    position: relative;
    padding-left: 22px;
    font-weight: 600;
    font-size: 0.9em;
}

.pgzw-settings-sidebar #postbox-container-1 .inside ul li:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    background-color: #2271b1;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>");
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/></svg>");
    mask-size: 16px;
    -webkit-mask-size: 16px;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: left;
    -webkit-mask-position: left;
}

@media (max-width: 1024px) {
    .pgzw-settings-layout {
        flex-direction: column;
    }

    .pgzw-settings-sidebar {
        width: 100%;
        position: static;
        top: auto;
        transform: none;
    }
}
