/* ============================================
   Plans Page - Trainify
   ============================================ */

/* ---- Page ---- */
.pln-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem 5rem;
    min-height: 75vh;
}

/* ---- Header ---- */
.pln-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.pln-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #03DDC2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.pln-back-btn:hover {
    background: rgba(3, 221, 194, 0.08);
    border-color: rgba(3, 221, 194, 0.25);
}

.pln-header__title {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.4;
}

/* ---- Banners ---- */
.pln-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
}

.pln-banner--active {
    background: rgba(3, 221, 194, 0.06);
    border: 1px solid rgba(3, 221, 194, 0.15);
}

.pln-banner--warning {
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.pln-banner__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 2px;
}

.pln-banner--active .pln-banner__icon {
    background: rgba(3, 221, 194, 0.1);
    color: #ffc107;
}

.pln-banner--warning .pln-banner__icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.pln-banner__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pln-banner__title {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
}

.pln-banner--warning .pln-banner__title {
    color: #ffc107;
}

.pln-banner__title strong {
    color: #03DDC2;
}

.pln-banner__detail {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pln-banner__detail strong {
    color: #fff;
}

.pln-banner--warning .pln-banner__detail strong {
    color: #ffc107;
}

/* ---- Section ---- */
.pln-section {
    margin-bottom: 2.5rem;
}

.pln-section__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pln-section__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(3, 221, 194, 0.15), rgba(60, 254, 165, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #03DDC2;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.pln-section__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

.pln-section__card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ---- Coupon ---- */
.pln-coupon {
    margin-bottom: 1.5rem;
}

.pln-coupon__inner {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    position: relative;
}

.pln-coupon__field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pln-coupon__icon-wrap {
    color: #03DDC2;
    font-size: 0.8rem;
    flex-shrink: 0;
    opacity: 0.6;
}

.pln-coupon__input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
    padding: 0;
}

.pln-coupon__input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.pln-coupon__msg {
    font-size: 0.75rem;
    min-height: 0;
    margin-top: 0;
    text-align: left;
    font-weight: 500;
}

.pln-coupon__msg:not(:empty) {
    margin-top: 0.5rem;
}

/* Coupon Badge */
.pln-coupon__inner #couponBadge,
#couponBadge {
    position: absolute !important;
    top: -10px !important;
    right: 12px !important;
    z-index: 10 !important;
    animation: pln-badge-float 2s ease-in-out infinite !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#couponBadge.bg-success {
    background: linear-gradient(135deg, #3cfea5 0%, #03ddc4 100%) !important;
    color: #000 !important;
}

#couponBadge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #fff !important;
}

@keyframes pln-badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ---- Plan Cards Grid ---- */
.pln-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* ---- Plan Card ---- */
/* Override cadastre.css .plan-card-item styles */
.pln-grid .plan-card-item {
    margin-bottom: 0 !important;
    width: auto !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    min-width: 0 !important;
    max-width: none !important;
}

.pln-grid .plan-card-item:hover {
    z-index: auto !important;
}

.pln-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.pln-card:hover {
    border-color: rgba(3, 221, 194, 0.2);
}

.pln-card--current {
    border: 3px solid;
    border-color: rgba(3, 221, 194, 0.35);
    box-shadow: 0 0 20px rgba(3, 221, 194, 0.08);
}

/* ---- Plan Tag (upgrade/downgrade/current) ---- */
.pln-tag {
    align-self: flex-end;
    padding: 0.2rem 0.65rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: -0.25rem;
}

.pln-tag--current {
    background: rgba(3, 221, 194, 0.12);
    color: #03DDC2;
    border: 1px solid rgba(3, 221, 194, 0.25);
}

.pln-tag--upgrade {
    background: rgba(60, 254, 165, 0.1);
    color: #3cfea5;
    border: 1px solid rgba(60, 254, 165, 0.25);
}

.pln-tag--downgrade {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

/* ---- Card Header ---- */
.pln-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pln-card__head .plan-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.pln-card__period-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(3, 221, 194, 0.08);
    color: #03DDC2;
    border: 1px solid rgba(3, 221, 194, 0.15);
    white-space: nowrap;
}

.pln-card__period-badge--free {
    background: rgba(60, 254, 165, 0.08);
    color: #3cfea5;
    border-color: rgba(60, 254, 165, 0.15);
}

/* ---- Price ---- */
.pln-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    padding: 0.5rem 0;
}

.pln-card__price .currency {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-right: 0.15rem;
}

.pln-card__price .price-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pln-card__price .price-period {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    margin-left: 0.1rem;
}

.pln-card__price-symbol {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3cfea5;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* ---- Total ---- */
.pln-card__total {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: -0.25rem;
}

/* ---- Description ---- */
.pln-card__desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
    margin: 0.25rem 0;
}

/* ---- Feature ---- */
.pln-card__feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.35rem 0;
}

.pln-card__feature i {
    font-size: 0.7rem;
    color: rgba(3, 221, 194, 0.6);
}

.pln-card__feature--highlight {
    color: #3cfea5;
}

.pln-card__feature--highlight i {
    color: #3cfea5;
}

/* ---- Card Footer ---- */
.pln-card__footer {
    margin-top: auto;
    padding-top: 0.75rem;
}

/* ---- Buttons ---- */
.pln-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    width: 100%;
}

.pln-btn--primary {
    background: linear-gradient(135deg, #03DDC2, #3cfea5);
    color: #040404;
}

.pln-btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(3, 221, 194, 0.25);
    color: #040404;
}

.pln-btn--outline {
    background: transparent;
    color: #03DDC2;
    border: 1px solid rgba(3, 221, 194, 0.3);
}

.pln-btn--outline:hover {
    background: rgba(3, 221, 194, 0.08);
    border-color: rgba(3, 221, 194, 0.5);
    color: #3cfea5;
}

.pln-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0.6rem 1rem;
}

.pln-btn--ghost:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
}

.pln-btn--disabled {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Modal ---- */
.pln-modal {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-height: 90vh;
}

.pln-modal__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.5rem;
}

.pln-modal__title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pln-modal__icon {
    color: #03DDC2;
    font-size: 1rem;
}

.pln-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.pln-modal__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ---- Summary ---- */
.pln-summary {
    background: rgba(3, 221, 194, 0.04);
    border: 1px solid rgba(3, 221, 194, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pln-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pln-summary__row:last-child {
    border-bottom: none;
}

.pln-summary__label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.pln-summary__value {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
    text-transform: capitalize;
}

.pln-summary__value--price {
    color: #03DDC2;
    font-weight: 700;
}

/* ---- Form Sections ---- */
.pln-form-section {
    margin-bottom: 1.5rem;
}

.pln-form-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #03DDC2;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(3, 221, 194, 0.1);
}

.pln-form-section__title i {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---- Form Grid ---- */
.pln-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pln-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pln-form-field--full {
    grid-column: 1 / -1;
}

.pln-form-field--small {
    grid-column: span 1;
}

.pln-form-field--large {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .pln-form-field--small {
        grid-column: span 1;
        max-width: 120px;
    }

    .pln-form-grid:has(.pln-form-field--small) {
        grid-template-columns: auto 1fr;
    }
}

.pln-form-field label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.pln-form-field .form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pln-form-field .form-control::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.pln-form-field .form-control:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(3, 221, 194, 0.4);
    box-shadow: 0 0 0 3px rgba(3, 221, 194, 0.08);
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
    .pln-form-grid {
        grid-template-columns: 1fr;
    }

    .pln-form-field--small,
    .pln-form-field--large {
        grid-column: span 1;
        max-width: none;
    }

    .pln-grid {
        grid-template-columns: 1fr;
    }

    .pln-header__title {
        font-size: 0.95rem;
    }
}

@media (max-width: 430px) {
    .pln-page {
        margin-top: 3.5rem;
    }
}
