/* Portfolio-X Admin Options Page Modern Styling */
.qcpx-admin-wrap {
    max-width: 100%;
    margin: 20px 20px 40px 0;
    color: #1e293b;
}

/* Header */
.qcpx-admin-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
    margin-bottom: 24px;
}

.qcpx-admin-header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qcpx-admin-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 22px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.qcpx-admin-header h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.qcpx-admin-header h2 span {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 3px;
}

.qcpx-admin-header-badge .qcpx-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Notice */
.qcpx-notice-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 4px solid #faad14;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.qcpx-notice-icon {
    color: #faad14;
    font-size: 20px;
    flex-shrink: 0;
}

.qcpx-notice-content {
    font-size: 14px;
    color: #595959;
    line-height: 1.5;
}

.qcpx-notice-content a {
    color: #096dd9;
    font-weight: 600;
    text-decoration: underline;
}

.qcpx-notice-content a:hover {
    color: #1890ff;
}

/* Tabs Nav */
.qcpx-nav-container {
    margin-bottom: 24px;
}

.qcpx-nav-container .nav-tab-wrapper {
    border-bottom: none;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qcpx-nav-container .nav-tab {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.qcpx-nav-container .nav-tab i {
    font-size: 15px;
}

.qcpx-nav-container .nav-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

.qcpx-nav-container .nav-tab-active,
.qcpx-nav-container .nav-tab-active:hover {
    background: #ffffff !important;
    color: #2563eb !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Tab Card */
.qcpx-tab-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.qcpx-card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.qcpx-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qcpx-card-header h3 i {
    color: #2563eb;
}

.qcpx-card-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Form Tables */
.qcpx-tab-card .form-table {
    margin-top: 0;
}

.qcpx-tab-card .form-table tr {
    border-bottom: 1px solid #f8fafc;
}

.qcpx-tab-card .form-table tr:last-child {
    border-bottom: none;
}

.qcpx-tab-card .form-table th {
    width: 280px;
    padding: 20px 20px 20px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    vertical-align: top;
    line-height: 1.5;
}

.qcpx-tab-card .form-table td {
    padding: 16px 0;
    vertical-align: middle;
}

.qcpx-tab-card .form-table input[type="text"],
.qcpx-tab-card .form-table select {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1e293b;
    width: 100%;
    max-width: 480px;
    height: auto;
    line-height: 1.4;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.qcpx-tab-card .form-table input[type="text"]:hover,
.qcpx-tab-card .form-table select:hover {
    border-color: #94a3b8;
    background-color: #ffffff;
}

.qcpx-tab-card .form-table input[type="text"]:focus,
.qcpx-tab-card .form-table select:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.qcpx-tab-card .form-table textarea {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #1e293b;
    line-height: 1.6;
    min-height: 220px;
    width: 100%;
    max-width: 720px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.qcpx-tab-card .form-table textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

.qcpx-field-desc {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
    font-style: normal;
    line-height: 1.4;
}

/* Checkbox Switch */
.qcpx-tab-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.qcpx-tab-card input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Getting Started Cards & Carousel */
.PortfolioX-Slider {
    margin-top: 10px;
    position: relative;
    width: 100%;
}

.PortfolioX-Slider .owl-carousel {
    display: block;
    width: 100%;
    position: relative;
}

.PortfolioX-Slider .owl-stage-outer {
    position: relative;
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 16px;
    margin-top: -24px;
    margin-bottom: -16px;
    width: 100%;
    box-sizing: border-box;
}

.PortfolioX-Slider .owl-stage {
    display: flex;
    position: relative;
}

.PortfolioX-Slider .owl-item {
    display: flex;
    float: none;
    height: auto;
    box-sizing: border-box;
}

.PortfolioX-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px 28px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    position: relative;
    box-sizing: border-box;
}

.PortfolioX-details {
    flex: 1;
    padding-left: 58px;
}

.PortfolioX-details h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 2px 0 10px 0;
    padding: 0;
}

.PortfolioX-details h3 {
    font-size: 15px;
    color: #334155;
    margin: 12px 0 8px 0;
    font-weight: 600;
}

.PortfolioX-details p {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.PortfolioX-img {
    min-width: 360px;
    max-width: 360px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.PortfolioX-img img {
    width: 100%;
    display: block;
}

/* Service Count Ribbon Badge with :before and :after */
.service-count {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    width: 60px !important;
    height: 72px !important;
    position: absolute !important;
    top: -14px !important;
    left: 20px !important;
    text-align: center !important;
    border-radius: 0 0 30px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3) !important;
    z-index: 30 !important;
    margin: 0 !important;
    padding: 8px 4px 6px 4px !important;
    box-sizing: border-box !important;
}

.service-count span {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    opacity: 0.9 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

.service-count strong {
    display: block !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin-top: 2px !important;
    color: #ffffff !important;
}

/* Before & After Decorative Elements */
.service-count:before,
.service-count:after {
    content: "" !important;
    position: absolute !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Left Fold Ear (:before) */
.service-count:before {
    top: 0 !important;
    left: -7px !important;
    width: 7px !important;
    height: 14px !important;
    background: #1e3a8a !important;
    border-radius: 6px 0 0 6px !important;
    clip-path: polygon(100% 0, 0 100%, 100% 100%) !important;
    z-index: -1 !important;
}

/* Top Accent Highlight Ring (:after) */
.service-count:after {
    top: 4px !important;
    left: 8px !important;
    right: 8px !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 3px !important;
    z-index: 25 !important;
}

/* Step 1 Styles */
.service-count.step-1 {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3) !important;
}
.service-count.step-1:before {
    background: #1e3a8a !important;
}

/* Step 2 Styles */
.service-count.step-2 {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}
.service-count.step-2:before {
    background: #064e3b !important;
}

/* Step 3 Styles */
.service-count.step-3 {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3) !important;
}
.service-count.step-3:before {
    background: #4c1d95 !important;
}

/* Step 4 Styles */
.service-count.step-4 {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3) !important;
}
.service-count.step-4:before {
    background: #78350f !important;
}

/* Slider Controls */
.PortfolioX-Slider .owl-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.PortfolioX-Slider .owl-carousel .owl-nav button.owl-next,
.PortfolioX-Slider .owl-carousel .owl-nav button.owl-prev {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.PortfolioX-Slider .owl-carousel .owl-nav button.owl-next:hover,
.PortfolioX-Slider .owl-carousel .owl-nav button.owl-prev:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Help Section */
.qcpx-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.qcpx-help-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.qcpx-help-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qcpx-help-card h4 i {
    color: #2563eb;
}

.qcpx-code-chip {
    display: inline-block;
    background: #1e293b;
    color: #38bdf8;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    margin: 6px 0;
}

.qcpx-param-list {
    margin-top: 12px;
}

.qcpx-param-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #cbd5e1;
}

.qcpx-param-item:last-child {
    border-bottom: none;
}

.qcpx-param-name {
    font-weight: 600;
    color: #2563eb;
    font-size: 13px;
}

/* Submit Bar */
.qcpx-submit-bar {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.qcpx-submit-bar input[type="submit"],
.qcpx-submit-bar .button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 10px 28px !important;
    height: auto !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.2s ease !important;
    text-shadow: none !important;
}

.qcpx-submit-bar input[type="submit"]:hover,
.qcpx-submit-bar .button-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Portfolio-X Edit Post Page & CMB2 Metabox Modern Styling (post_type=qcpx_portfolio)
   ========================================================================== */

/* Post Title Input */
body.post-type-qcpx_portfolio #titlediv #title,
body.post-type-portfolio-x #titlediv #title {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

body.post-type-qcpx_portfolio #titlediv #title:focus,
body.post-type-portfolio-x #titlediv #title:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Post Edit Metaboxes */
body.post-type-qcpx_portfolio .postbox,
body.post-type-portfolio-x .postbox {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 24px;
}

body.post-type-qcpx_portfolio .postbox .hndle,
body.post-type-portfolio-x .postbox .hndle {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

/* CMB2 Wrap & Rows */
body.post-type-qcpx_portfolio .cmb-row,
body.post-type-portfolio-x .cmb-row {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

body.post-type-qcpx_portfolio .cmb-row:last-child,
body.post-type-portfolio-x .cmb-row:last-child {
    border-bottom: none;
}

body.post-type-qcpx_portfolio .cmb-th,
body.post-type-portfolio-x .cmb-th {
    width: 220px;
    padding-right: 20px;
}

body.post-type-qcpx_portfolio .cmb-th label,
body.post-type-portfolio-x .cmb-th label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

body.post-type-qcpx_portfolio .cmb2-wrap input[type="text"],
body.post-type-qcpx_portfolio .cmb2-wrap select,
body.post-type-portfolio-x .cmb2-wrap input[type="text"],
body.post-type-portfolio-x .cmb2-wrap select {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s ease;
    max-width: 460px;
    width: 100%;
}

body.post-type-qcpx_portfolio .cmb2-wrap input[type="text"]:focus,
body.post-type-qcpx_portfolio .cmb2-wrap select:focus,
body.post-type-portfolio-x .cmb2-wrap input[type="text"]:focus,
body.post-type-portfolio-x .cmb2-wrap select:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Multicheck list */
body.post-type-qcpx_portfolio .cmb2-checkbox-list,
body.post-type-portfolio-x .cmb2-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 8px 0 0 0;
}

body.post-type-qcpx_portfolio .cmb2-checkbox-list li,
body.post-type-portfolio-x .cmb2-checkbox-list li {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

body.post-type-qcpx_portfolio .cmb2-checkbox-list li:hover,
body.post-type-portfolio-x .cmb2-checkbox-list li:hover {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* Shortcode Pill Chips */
.column-shortcode code,
.qcpx-shortcode-pill {
    background: #0f172a !important;
    color: #38bdf8 !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-family: monospace !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Shortcode Generator Modal */
#sm-modal.modal {
    background-color: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(6px) !important;
    z-index: 999999 !important;
}

#sm-modal .modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px 32px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    width: 520px !important;
    max-width: 90vw !important;
    margin: 60px auto !important;
}

#sm-modal .modal-content h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-top: 0 !important;
}

#sm-modal .close {
    color: #64748b !important;
    font-size: 24px !important;
    transition: color 0.2s ease !important;
}

#sm-modal .close:hover {
    color: #ef4444 !important;
}

#sm-modal .qcpx_single_field_shortcode {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sm-modal .qcpx_single_field_shortcode label {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

#sm-modal .qcpx_single_field_shortcode select {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1e293b;
}
