/**
 * SharePoster Admin Styles
 *
 * @package SharePoster
 * @since 1.0.0
 */
/* Grid System */
.swp-container-fluid {
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
.swp-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}
.swp-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}
.swp-col-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    padding-right: 15px;
    padding-left: 15px;
}
.swp-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.swp-col-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.swp-col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
}
.swp-col-50{
    width: 46%;
}
.top-bottom-0{
    justify-content: space-between;
    padding: 0 15px;
}
.swp-col{
    width: 100%;
    padding: 0 15px;
}
/* Responsive columns for larger screens */
@media (min-width: 992px) {
    .swp-col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .swp-col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
        padding-right: 15px;
        padding-left: 15px;
    }
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 991px) {
    .swp-col-lg-4,
    .swp-col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .swp-order-1,
    .swp-order-2 {
        order: 0;
    }
}

/* Order utilities */
.swp-order-0 {
    order: 0;
}

.swp-order-1 {
    order: 1;
}

.swp-order-2 {
    order: 2;
}

/* Flexbox utilities */
.swp-controls-wrap{
    max-width: 404px;
    width: 100%;
}
.swp-content-wrap .swp-content{
    max-width: 550px;
    width: 100%;
}
.swp-d-flex {
    display: flex;
}

.swp-flex-column {
    flex-direction: column;
}

.swp-align-items-center {
    align-items: center;
}

/* Spacing utilities */
.swp-p-0 {
    padding: 0;
}

.swp-p-4 {
    padding: 1.5rem;
}

.swp-px-3 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.swp-px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.swp-py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.swp-py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.swp-mb-3 {
    margin-bottom: 1rem;
}

.swp-mt-3 {
    margin-top: 1rem;
}

.swp-mt-5 {
    margin-top: 3rem;
}

/* Text utilities */
.swp-text-center {
    text-align: center;
}

.swp-text-left {
    text-align: left;
}

.swp-text-white {
    color: #fff;
}

.swp-text-dark {
    color: #212529;
}

.swp-fw-bold {
    font-weight: 700;
}

.swp-text-decoration-none {
    text-decoration: none;
}

.swp-float-end {
    float: right;
}
.swp-preview-link{
    justify-content: space-between;
    align-items: center;
}
.swp-preview-link .post-link{
    min-width: 120px;
}
.swp-preview-link .post-link a{
    text-decoration: none;
    font-size: 18px;
}
.swp-preview-link .post-link span{
    padding: 0 5px;
}
/* Alert styles */
.swp-alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
}

.swp-alert-info {
    background: #16a24933;
    border-radius: 8px;
    color: #16a249;
    font-weight: 700;
    line-height: 1;
    padding: 8px 12px;
}

/* Form styles */
.swp-form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    width: 200px;
}

.swp-form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.swp-form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.swp-form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    appearance: none;
}

.swp-form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.swp-w-100 {
    width: 100%;
}

.swp-m-auto {
    margin-left: auto;
    margin-right: auto;
}

.swp-overflow-auto {
    overflow: auto;
}
.swp-controls-inner-item {
    display: flex;
    gap: 1rem;
}
/* Button styling */
#save_all_settings,
#reset_settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    height: 40px;
}

#save_all_settings {
    background-color: #0073aa;
    color: #fff;
}

#save_all_settings:hover {
    background-color: #005a87;
}

#reset_settings {
    background-color: #f0f0f1;
    color: #2c3338;
    border: 1px solid #8c8f94;
}

#reset_settings:hover {
    background-color: #e0e0e1;
}
/* Button styles */
.swp-btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.swp-btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.swp-btn-success:hover {
    color: #fff;
    background-color: #157347;
    border-color: #146c43;
}

.swp-btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

/* Icon replacements (using Unicode/HTML entities) */
.swp-icon-save::before {
    content: "💾";
    margin-right: 5px;
}

.swp-icon-reset::before {
    content: "🔄";
    margin-right: 5px;
}

.swp-icon-download::before {
    content: "⬇";
    margin-right: 5px;
}

.swp-icon-check::before {
    content: "✓";
    margin-right: 5px;
}

.swp-icon-loading::before {
    content: "⏳";
    margin-right: 5px;
}

/* WordPress Admin Overrides */
.shareposter-admin-wrap {
    background: #ffffff;
    margin: 0;
    border-radius: 18px;
    padding: 15px;
    box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.15);
    border: 1px solid #c3c4c7;
}

#swp-heading * {
    line-height: inherit;
    font-size: inherit;
}
.shareposter-title{
    background: #000;
    border-radius: 15px;
    border-bottom-left-radius: 0;
    border-bottom: 1px solid #2d2d2d;
    font-size: 24px;
    margin-bottom: 0px;
}
.swp-controls{
    background: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    margin-bottom: 15px;
}
.shareposter-admin-wrap {
    background: #fff;
    margin: 0;
    padding: 0px;
}

/* Keep WordPress notices at the top */
.wrap > .notice,
.wrap > .updated,
.wrap > .error {
    margin: 5px 0 15px !important;
}
.swp-form-range {
    display: block;
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}
.swp-form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #04AA6D;
    border-radius: 50%;
    cursor: pointer;
}

.swp-form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #04AA6D;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
#shareshap-card {
    width: 526px;
    height: 526px;
    position: relative;
    background-color: white;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dadada;
}

.swp-poster-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
.swp-poster-content h1 {
    font-weight: 800;
    font-size: 28px;
    line-height: 36px;
    text-align: center;
    padding: 0 10px;
    margin-top: 5px;
    height: 112px;
    align-content: center;
    overflow: hidden;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swp-poster-content h1 >* {
    margin: 0;
    padding: 0;
}

.swp-poster-content h1 span {
    cursor: pointer;
    transition: color 0.2s ease;
    color: inherit; /* Inherit color from parent h1 */
}

.swp-poster-content h1 span.highlight {
    color: #E71319 !important; /* Override inherited color for highlighted spans */
}

.swp-poster-content h1 span:hover {
    opacity: 0.8;
}

.swp-poster-content .swp-pc-photo img {
    height: 266px;
    width: 100%;
    margin: auto;
    border-radius: 10px;
    object-fit: cover;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.swp-web-address {
    background: transparent;
    padding: 0px 15px;
    font-family: sans-serif;
    font-size: 12px;
    text-align: center;
    color: black;
    margin-top: 2px;
    border-radius: 15px;
}

.swp-learn-more {
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(111, 200, 255, 1) 40%, rgba(111, 200, 255, 1) 60%, rgba(255, 255, 255, 0) 100%);
    color: #1f1363;
    font-weight: bold;
}

.swp-pc-photo {
    height: 266px;
    width: 90%;
    object-fit: cover;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
}
.swp-poster-body {
    position: relative;
    width: 100%;
    padding: 8px 0;
    bottom: 0;
    gap: 6px;
}
.swp-poster-footer {
    position: absolute;
    width: 100%;
    bottom: -61px;
    padding: 8px 0;
}  
.swp-poster-header {
    position: relative;
    width: 100%;
    padding: 8px 0;
}
.swp-poster-header .swp-row{
    margin: 0;
    padding: 0 15px;
    justify-content: space-between;
}
/*.swp-poster-header img {
    width: 100%;
    height: 50px;
    object-fit: scale-down;
    object-position: right;
}
.swp-poster-logo{
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 230px;
	overflow: hidden;
}*/
.swp-poster-logo {
  width: 230px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* because you used .swp-float-end */
  overflow: hidden; /* hide anything that spills out */
}
.custom-logo-link{
    float: right!important;
    width: 230px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}
.swp-poster-logo img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain; /* keeps logo ratio without stretching */
}
.swp-poster-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* WordPress Admin Overrides */
.shareposter-admin-wrap .swp-container-fluid {
    max-width: 1400px;
}
.shareposter-admin-wrap .swp-form-control,
.shareposter-admin-wrap .swp-form-select {
    background-color: #fff;
    border: 1px solid #8c8f94;
    height: 40px;
}
.swp-controls-wrap .wp-core-ui .button-primary{
    height: 40px;
}
.shareposter-admin-wrap .swp-form-control:focus,
.shareposter-admin-wrap .swp-form-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.shareposter-admin-wrap label {
    font-weight: 600;
}

/* WordPress button success style */
.button.button-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.button.button-success:hover {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
}

#dw_bt {
    margin-top: 10px;
}

#dw_bt:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.swp-poster-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swp-meta {
    font-family: sans-serif;
    font-size: 14px;
}
.swp-controls-inner-item {
    display: flex;
    gap: 1rem;
}

/* Media query for iPad and larger devices */
@media (min-width: 768px) {
    .swp-controls {
        /*max-height: 700px;*/
        overflow-y: auto;
    }
}