/**
 * استایل صفحات سرپرستی ایتام در حساب کاربری
 * مسیر فایل: wp-content/plugins/shaaf/assets/css/shaaf-orphan-account.css
 *
 * قبلا داخل includes/pages/orphan-page.php و در هر بار بارگذاری صفحه چاپ می شد (۴ بلوک style).
 * حالا یک فایل جدا است که مرورگر کش می کند؛ در همان جای قبلی (wp_head اولویت 99) بارگذاری می شود
 * تا ترتیب اعمال استایل ها دقیقا مثل قبل بماند.
 */
/* ---------- dashboard design ---------- */
/* -----------------------------------------------
         * Main wrapper
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form {
            direction: rtl;
            width: 100%;
            max-width: 1100px;
            margin: 0 auto;
            font-family: inherit;
            color: #172033;
        }

        .woocommerce-account .mostamari_donation_form,
        .woocommerce-account .mostamari_donation_form * {
            box-sizing: border-box;
        }


        /* -----------------------------------------------
         * Hero
         * ----------------------------------------------- */



        /* -----------------------------------------------
         * Empty state
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .no_orphan {
            position: relative;

            background:
                linear-gradient(
                    135deg,
                    #f7fcf9,
                    #ffffff
                );

            border: 1px dashed #c9e5d6;

            border-radius: 22px;

            padding: 34px 25px;

            margin: 0 0 22px;

            text-align: center;

            overflow: hidden;
        }

        .woocommerce-account .mostamari_donation_form .no_orphan img {
            width: 90px;
            height: 90px;

            object-fit: contain;

            margin: 0 auto 8px;

            opacity: .88;
        }

        .woocommerce-account .mostamari_donation_form .no_orphan p {
            margin: 5px 0;

            color: #243047;

            font-size: 17px;
            font-weight: 800;
            line-height: 2;
        }


        /* -----------------------------------------------
         * Active orphan card
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .most {
            position: relative;

            display: grid;

            grid-template-columns: minmax(0, 1fr);

            gap: 0;

            background: #ffffff;

            border: 1px solid #e1e8ef;

            border-radius: 24px;

            padding: 22px;

            margin: 0 0 20px;

            box-shadow:
                0 8px 30px rgba(22, 39, 58, .055);

            transition:
                transform .25s ease,
                box-shadow .25s ease,
                border-color .25s ease;
        }

        .woocommerce-account .mostamari_donation_form .most:hover {
            transform: translateY(-3px);

            border-color: #ccebdd;

            box-shadow:
                0 15px 38px rgba(0, 166, 81, .10);
        }


        /* -----------------------------------------------
         * Payment intro
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .pdetail {
            background: #f3fbf6;

            border-radius: 15px;

            padding: 12px 16px;

            margin: 0 0 20px;

            color: #596879;

            font-size: 14px;

            line-height: 2;
        }

        .woocommerce-account .mostamari_donation_form .pdetail .green {
            color: #009c50;

            font-weight: 800;
        }

        .woocommerce-account .mostamari_donation_form .pdetail .red {
            display: inline-block;

            background: #fff0f1;

            color: #d92f3d;

            border-radius: 9px;

            padding: 2px 9px;

            font-weight: 800;
        }


        /* -----------------------------------------------
         * Child details section
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .pdetail_sec {
            display: grid;

            grid-template-columns: 125px minmax(0, 1fr);

            gap: 22px;

            align-items: center;

            margin-bottom: 20px;
        }

        .woocommerce-account .mostamari_donation_form .pdetail_col1 {
            text-align: center;
        }

        .woocommerce-account .mostamari_donation_form .pdetail_col1 img {
            display: block;

            width: 120px;
            height: 120px;

            object-fit: cover;

            border-radius: 20px;

            border: 4px solid #f1fbf5;

            box-shadow:
                0 8px 20px rgba(0, 0, 0, .08);
        }

        .woocommerce-account .mostamari_donation_form .pdetail_family {
            font-size: 20px;

            font-weight: 800;

            line-height: 1.9;

            margin-bottom: 10px;
        }

        .woocommerce-account .mostamari_donation_form .pdetail_family a {
            color: #009c50 !important;

            text-decoration: none !important;
        }

        .woocommerce-account .mostamari_donation_form .pdetail_family a:hover {
            color: #007d40 !important;
        }


        /* -----------------------------------------------
         * Metadata
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .pgray {
            display: flex;

            align-items: center;

            justify-content: space-between;

            gap: 15px;

            padding: 9px 0;

            border-bottom: 1px dashed #e7edf0;

            color: #7a8795;

            font-size: 13px;

            line-height: 1.9;
        }

        .woocommerce-account .mostamari_donation_form .pgray:last-child {
            border-bottom: 0;
        }

        .woocommerce-account .mostamari_donation_form .pgray .gray {
            color: #202a3a;

            font-weight: 800;
        }


        /* -----------------------------------------------
         * Card action area
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .most_col2 {
            display: flex;

            align-items: center;

            justify-content: flex-start;

            gap: 11px;

            padding-top: 18px;

            border-top: 1px solid #edf1f3;
        }

        .woocommerce-account .mostamari_donation_form #btn_pay {
            display: inline-flex;

            align-items: center;

            justify-content: center;

            min-width: 190px;

            padding: 12px 22px;

            background:
                linear-gradient(
                    135deg,
                    #00bd63,
                    #009d55
                );

            color: #ffffff !important;

            text-decoration: none !important;

            border-radius: 13px;

            font-size: 14px;

            font-weight: 800;

            line-height: 1.8;

            box-shadow:
                0 8px 18px rgba(0, 166, 81, .18);

            transition:
                transform .2s ease,
                box-shadow .2s ease;
        }

        .woocommerce-account .mostamari_donation_form #btn_pay:hover {
            transform: translateY(-2px);

            box-shadow:
                0 12px 25px rgba(0, 166, 81, .25);
        }

        .woocommerce-account .mostamari_donation_form #btn_cancel {
            border: 1px solid #e1e7ec;

            background: #ffffff;

            color: #687586;

            padding: 11px 19px;

            border-radius: 12px;

            font-family: inherit;

            font-size: 13px;

            font-weight: 700;

            cursor: pointer;

            transition: all .2s ease;
        }

        .woocommerce-account .mostamari_donation_form #btn_cancel:hover {
            border-color: #ffd2d5;

            background: #fff5f5;

            color: #d32f3f;
        }


        /* -----------------------------------------------
         * New orphan CTA
         * ----------------------------------------------- */

        .woocommerce-account .shaaf-new-orphan-wrapper {
            position: relative;

            margin: 25px 0 10px;

            padding: 30px 25px;

            background:
                linear-gradient(
                    135deg,
                    #f7fcf9,
                    #ffffff
                );

            border: 1px dashed #c9e5d6;

            border-radius: 22px;

            text-align: center;

            overflow: hidden;
        }

        .woocommerce-account .shaaf-new-orphan-wrapper::before {
            content: "♥";

            position: absolute;

            right: 25px;
            top: 8px;

            color: rgba(0, 166, 81, .07);

            font-size: 65px;

            transform: rotate(-12deg);
        }

        .woocommerce-account .shaaf-new-orphan-wrapper::after {
            content: "♥";

            position: absolute;

            left: 30px;
            bottom: 4px;

            color: rgba(0, 166, 81, .06);

            font-size: 50px;

            transform: rotate(12deg);
        }

        .woocommerce-account .shaaf-new-orphan-content {
            position: relative;

            z-index: 2;
        }

        .woocommerce-account .shaaf-new-orphan-icon {
            width: 44px;
            height: 44px;

            display: flex;

            align-items: center;
            justify-content: center;

            margin: 0 auto 8px;

            border-radius: 50%;

            background: #e8f9ef;

            color: #00a651;

            font-size: 22px;
        }

        .woocommerce-account .shaaf-new-orphan-title {
            color: #172033;

            font-size: 21px;

            font-weight: 900;

            line-height: 1.9;

            margin-bottom: 4px;
        }

        .woocommerce-account .shaaf-new-orphan-text {
            color: #718096;

            font-size: 13px;

            line-height: 2;

            margin-bottom: 17px;
        }

        .woocommerce-account .shaaf-new-orphan-button {
            display: inline-flex !important;

            align-items: center;

            justify-content: center;

            gap: 7px;

            min-width: 235px;

            padding: 13px 28px;

            background:
                linear-gradient(
                    135deg,
                    #00bd63,
                    #009c52
                ) !important;

            color: #ffffff !important;

            border-radius: 14px !important;

            text-decoration: none !important;

            font-size: 15px !important;

            font-weight: 800 !important;

            line-height: 1.8;

            box-shadow:
                0 9px 22px rgba(0, 166, 81, .18);

            transition:
                transform .2s ease,
                box-shadow .2s ease;
        }

        .woocommerce-account .shaaf-new-orphan-button:hover {
            transform: translateY(-2px);

            color: #ffffff !important;

            box-shadow:
                0 13px 28px rgba(0, 166, 81, .25);
        }

        .woocommerce-account .shaaf-new-orphan-plus {
            display: inline-flex;

            align-items: center;
            justify-content: center;

            width: 23px;
            height: 23px;

            border-radius: 50%;

            background: rgba(255,255,255,.20);

            color: #ffffff;

            font-size: 20px;

            line-height: 1;
        }


        /* -----------------------------------------------
         * Gravity Forms on orphan signup
         * ----------------------------------------------- */

        .woocommerce-account .mostamari_donation_form .gform_wrapper {
            margin-top: 20px;
        }

        .woocommerce-account .mostamari_donation_form .gform_wrapper form {
            background: #ffffff;

            border: 1px solid #e3e9ee;

            border-radius: 20px;

            padding: 22px;

            box-shadow:
                0 8px 25px rgba(0,0,0,.045);
        }


        /* -----------------------------------------------
         * Responsive
         * ----------------------------------------------- */

        @media (max-width: 767px) {

            .woocommerce-account .mostamari_donation_form::before {
                padding: 21px 18px;

                border-radius: 18px;

                font-size: 17px;

                line-height: 2;
            }

            .woocommerce-account .mostamari_donation_form .most {
                padding: 16px;

                border-radius: 18px;
            }

            .woocommerce-account .mostamari_donation_form .pdetail_sec {
                grid-template-columns: 1fr;

                gap: 15px;
            }

            .woocommerce-account .mostamari_donation_form .pdetail_col1 img {
                width: 105px;
                height: 105px;

                margin: 0 auto;
            }

            .woocommerce-account .mostamari_donation_form .pdetail_family {
                font-size: 17px;

                text-align: center;
            }

            .woocommerce-account .mostamari_donation_form .pgray {
                flex-direction: column;

                align-items: flex-start;

                gap: 2px;
            }

            .woocommerce-account .mostamari_donation_form .most_col2 {
                flex-direction: column;

                align-items: stretch;
            }

            .woocommerce-account .mostamari_donation_form #btn_pay,
            .woocommerce-account .mostamari_donation_form #btn_cancel {
                width: 100%;

                min-width: 0;

                text-align: center;

                justify-content: center;
            }

            .woocommerce-account .shaaf-new-orphan-wrapper {
                padding: 24px 15px;

                border-radius: 18px;
            }

            .woocommerce-account .shaaf-new-orphan-title {
                font-size: 18px;
            }

            .woocommerce-account .shaaf-new-orphan-button {
                width: 100%;

                min-width: 0;
            }

        }

/* ---------- v1.2 design overrides ---------- */
.woocommerce-account .mostamari_donation_form{max-width:1100px!important;margin:0 auto!important;direction:rtl!important}
        .woocommerce-account .shaaf-orphan-hero{display:flex;align-items:center;justify-content:center;min-height:128px;margin:0 0 20px;padding:28px 34px;border-radius:24px;background:linear-gradient(135deg,#00b95a,#009f68);color:#fff;box-shadow:0 16px 35px rgba(0,166,81,.15);text-align:center}
        .woocommerce-account .shaaf-orphan-hero-title{font-size:25px;font-weight:900;line-height:1.9}
        .woocommerce-account .shaaf-orphan-hero-text{margin-top:5px;font-size:14px;font-weight:600;opacity:.92}
        .woocommerce-account .shaaf-new-orphan-wrapper{display:grid!important;grid-template-columns:minmax(0,1fr) 310px;align-items:center;min-height:245px;margin:0 0 30px!important;padding:25px 34px!important;border:1px solid #e2ebe6!important;border-radius:24px!important;background:linear-gradient(135deg,#fff,#f7fcf9)!important;box-shadow:0 8px 28px rgba(25,53,72,.045);text-align:right!important;overflow:hidden}
        .woocommerce-account .shaaf-new-orphan-content{position:relative;z-index:3;text-align:right;padding:10px 0}
        .woocommerce-account .shaaf-new-orphan-icon{width:42px!important;height:42px!important;margin:0 0 10px!important;background:#e9f9ef!important;color:#00a651!important}
        .woocommerce-account .shaaf-new-orphan-title{font-size:24px!important;font-weight:900!important;color:#172033!important;line-height:1.8!important}
        .woocommerce-account .shaaf-new-orphan-text{font-size:14px!important;color:#718096!important;max-width:560px;margin:4px 0 20px!important}
        .woocommerce-account .shaaf-new-orphan-button{min-width:235px!important;width:max-content!important}
        .woocommerce-account .shaaf-new-orphan-visual{position:relative;height:195px;overflow:hidden;border-radius:20px;background:radial-gradient(circle at 50% 55%,#e7f8ed 0 28%,transparent 29%),radial-gradient(circle at 30% 55%,#effaf3 0 25%,transparent 26%),radial-gradient(circle at 70% 55%,#effaf3 0 25%,transparent 26%)}
        .woocommerce-account .shaaf-new-orphan-heart{position:absolute;left:50%;top:20px;transform:translateX(-50%) rotate(-7deg);font-size:94px;color:#e73c4b;text-shadow:0 8px 18px rgba(231,60,75,.15);z-index:2}
        .woocommerce-account .shaaf-new-orphan-sun{position:absolute;right:20px;top:10px;font-size:48px;color:#f6bd20;z-index:2}
        .woocommerce-account .shaaf-orphan-list-heading{display:flex;justify-content:flex-start;align-items:center;margin:0 0 14px;padding:0 4px}
        .woocommerce-account .shaaf-orphan-list-title{font-size:22px;font-weight:900;color:#172033;line-height:1.9}
        .woocommerce-account .shaaf-orphan-list-title span{color:#00a651;margin-right:4px}
        .woocommerce-account .shaaf-orphan-list-subtitle{font-size:13px;color:#7b8795;margin-top:1px}
        .woocommerce-account .shaaf-orphan-memberships{display:flex;flex-direction:column;gap:18px}
        .woocommerce-account .shaaf-orphan-memberships .most{display:block!important;padding:22px!important;margin:0!important;border-radius:24px!important;background:#fff!important;border:1px solid #e2e9ee!important;box-shadow:0 9px 30px rgba(22,39,58,.055)!important}
        .woocommerce-account .shaaf-orphan-memberships .most:hover{transform:translateY(-2px);border-color:#cde8d8!important;box-shadow:0 15px 36px rgba(0,166,81,.09)!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail{margin:0 0 17px!important;background:#f5fbf7!important;border-radius:13px!important;padding:10px 14px!important;font-size:13px!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_sec{display:grid!important;grid-template-columns:150px minmax(0,1fr)!important;gap:24px!important;align-items:center!important;margin-bottom:18px!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_col1{order:2!important;text-align:center!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_col1 img{width:145px!important;height:145px!important;object-fit:cover!important;border-radius:20px!important;border:4px solid #f0faf4!important;box-shadow:0 8px 22px rgba(0,0,0,.07)!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_col2{order:1!important;min-width:0}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_family{font-size:21px!important;font-weight:900!important;margin-bottom:12px!important}
        .woocommerce-account .shaaf-orphan-memberships .pdetail_family a{color:#009c50!important}
        .woocommerce-account .shaaf-orphan-memberships .orphan-stats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:11px!important}
        .woocommerce-account .shaaf-orphan-memberships .pgray{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;min-height:82px!important;padding:13px 15px!important;background:#fbfcfd!important;border:1px solid #edf1f4!important;border-radius:13px!important;color:#778496!important;font-size:12px!important;line-height:1.8!important}
        .woocommerce-account .shaaf-orphan-memberships .pgray .pgray-label{display:flex;align-items:center;gap:7px;color:#718096!important;font-weight:600!important}
        .woocommerce-account .shaaf-orphan-memberships .pgray .gray{font-size:16px!important;font-weight:900!important;color:#172033!important}
        .woocommerce-account .orphan-stat-icon{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:8px;background:#eaf8ef;color:#00a651;font-size:13px;font-weight:900}
        .woocommerce-account .shaaf-orphan-memberships .most_col2{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding-top:16px!important;border-top:1px solid #edf1f3!important}
        .woocommerce-account .shaaf-orphan-memberships #btn_pay{min-width:230px!important}
        .woocommerce-account .shaaf-orphan-memberships #btn_cancel{min-width:150px!important}
        @media(max-width:767px){
            .woocommerce-account .shaaf-orphan-hero{min-height:115px;padding:20px 16px;border-radius:18px}
            .woocommerce-account .shaaf-orphan-hero-title{font-size:18px}
            .woocommerce-account .shaaf-orphan-hero-text{font-size:12px}
            .woocommerce-account .shaaf-new-orphan-wrapper{grid-template-columns:1fr!important;padding:22px 18px!important;text-align:center!important;min-height:0}
            .woocommerce-account .shaaf-new-orphan-content{text-align:center!important}
            .woocommerce-account .shaaf-new-orphan-icon{margin:0 auto 8px!important}
            .woocommerce-account .shaaf-new-orphan-visual{height:125px;order:2;margin-top:12px}
            .woocommerce-account .shaaf-new-orphan-heart{font-size:70px}
            .woocommerce-account .shaaf-new-orphan-sun{font-size:34px}
            .woocommerce-account .shaaf-orphan-list-title{font-size:19px}
            .woocommerce-account .shaaf-orphan-memberships .pdetail_sec{grid-template-columns:1fr!important;gap:15px!important}
            .woocommerce-account .shaaf-orphan-memberships .pdetail_col1{order:1!important}
            .woocommerce-account .shaaf-orphan-memberships .pdetail_col2{order:2!important}
            .woocommerce-account .shaaf-orphan-memberships .pdetail_col1 img{width:110px!important;height:110px!important;margin:auto!important}
            .woocommerce-account .shaaf-orphan-memberships .pdetail_family{text-align:center!important;font-size:18px!important}
            .woocommerce-account .shaaf-orphan-memberships .orphan-stats{grid-template-columns:1fr!important}
            .woocommerce-account .shaaf-orphan-memberships .most_col2{flex-direction:column!important;align-items:stretch!important}
            .woocommerce-account .shaaf-orphan-memberships #btn_pay,.woocommerce-account .shaaf-orphan-memberships #btn_cancel{width:100%!important;min-width:0!important}
        }

/* ---------- v1.2.1 display fix ---------- */
/* Membership card: image on the right, details on the left */
        .woocommerce-account .shaaf-orphan-memberships .pdetail_sec{
            display:grid !important;
            grid-template-columns:minmax(0,1fr) 150px !important;
            direction:rtl !important;
            align-items:center !important;
            gap:24px !important;
        }

        .woocommerce-account .shaaf-orphan-memberships .pdetail_col1{
            grid-column:2 !important;
            grid-row:1 !important;
            order:initial !important;
            width:150px !important;
            justify-self:end !important;
        }

        .woocommerce-account .shaaf-orphan-memberships .pdetail_col2{
            grid-column:1 !important;
            grid-row:1 !important;
            order:initial !important;
            min-width:0 !important;
            width:100% !important;
        }

        .woocommerce-account .shaaf-orphan-memberships .pdetail_col1 img{
            display:block !important;
            width:145px !important;
            height:145px !important;
            margin:0 !important;
            object-fit:cover !important;
        }

        .woocommerce-account .shaaf-orphan-memberships .pdetail_family{
            text-align:right !important;
        }

        /* Keep the four information cards together in the left area */
        .woocommerce-account .shaaf-orphan-memberships .orphan-stats{
            width:100% !important;
            display:grid !important;
            grid-template-columns:1fr 1fr !important;
            gap:11px !important;
        }

        .woocommerce-account .shaaf-orphan-memberships .pgray{
            width:100% !important;
            min-width:0 !important;
        }

        /* Mobile */
        @media(max-width:767px){

            .woocommerce-account .shaaf-orphan-memberships .pdetail_sec{
                display:grid !important;
                grid-template-columns:1fr !important;
                gap:15px !important;
            }

            .woocommerce-account .shaaf-orphan-memberships .pdetail_col1{
                grid-column:1 !important;
                grid-row:auto !important;
                width:100% !important;
                justify-self:stretch !important;
            }

            .woocommerce-account .shaaf-orphan-memberships .pdetail_col2{
                grid-column:1 !important;
                grid-row:auto !important;
                width:100% !important;
            }

            .woocommerce-account .shaaf-orphan-memberships .pdetail_col1 img{
                width:110px !important;
                height:110px !important;
                margin:0 auto !important;
            }

            .woocommerce-account .shaaf-orphan-memberships .pdetail_family{
                text-align:center !important;
            }

            .woocommerce-account .shaaf-orphan-memberships .orphan-stats{
                grid-template-columns:1fr !important;
            }
        }

/* ---------- v1.2.2 final fixes ---------- */
/*
         * Membership section follows the welcome/CTA sections.
         * This is a safety rule in case another theme rule changes
         * the flow direction/order.
         */
        .woocommerce-account .mostamari_donation_form{
            display:block !important;
        }

        .woocommerce-account .shaaf-orphan-hero,
        .woocommerce-account .shaaf-new-orphan-wrapper,
        .woocommerce-account .shaaf-orphan-list-heading,
        .woocommerce-account .shaaf-orphan-memberships{
            position:relative;
        }

        .woocommerce-account .shaaf-orphan-memberships{
            clear:both !important;
        }


        /* -----------------------------------------------
         * Mobile action buttons
         * ----------------------------------------------- */

        @media (max-width:767px){

            .woocommerce-account .shaaf-orphan-memberships .most_col2{
                display:flex !important;
                flex-direction:column !important;
                align-items:center !important;
                justify-content:center !important;
                gap:12px !important;
            }

            /* Payment button remains wide */
            .woocommerce-account .shaaf-orphan-memberships #btn_pay{
                display:flex !important;
                align-items:center !important;
                justify-content:center !important;

                width:100% !important;
                max-width:320px !important;
                min-width:0 !important;

                margin:0 auto !important;
            }

            /* Cancel button must stay compact and centered */
            .woocommerce-account .shaaf-orphan-memberships #btn_cancel,
            .woocommerce-account .shaaf-orphan-memberships .btn_cancel_orphan{
                display:inline-flex !important;
                align-items:center !important;
                justify-content:center !important;

                width:auto !important;
                min-width:145px !important;
                max-width:180px !important;

                margin:0 auto !important;
                padding:8px 18px !important;

                align-self:center !important;

                white-space:nowrap !important;

                border-radius:999px !important;

                font-size:12px !important;
                line-height:1.7 !important;
            }
        }
