/**
 * HotelHack Membership - Public Styles
 */

/* Подписка */
.hotelhack-subscription-info {
    margin: 20px 0;
}

.subscription-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subscription-header h3 {
    margin: 0;
}

.status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status.active {
    background: #4CAF50;
    color: white;
}

.subscription-details {
    margin: 20px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

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

.detail-item--budget {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.subscription-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hh-change-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #664d03;
}

.hh-change-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

#hh-change-tariff-section {
    margin-top: 20px;
}

#hh-change-tariff-section h3 {
    margin-bottom: 12px;
}

/* Budget progress bar */
.hh-budget-bar-wrapper {
    width: 100%;
}

.hh-budget-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}

.hh-budget-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.hh-budget-bar__text {
    font-size: 13px;
    color: #4a5568;
}

/* Period selector */
.hh-period-selector {
    display: flex;
    gap: 0;
    margin: 20px 0 16px;
    border: 2px solid #667eea;
    border-radius: 8px;
    overflow: hidden;
}

.hh-period-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: #fff;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hh-period-btn:not(:last-child) {
    border-right: 2px solid #667eea;
}

.hh-period-btn.active {
    background: #667eea;
    color: #fff;
}

.hh-period-btn:hover:not(.active) {
    background: #edf2f7;
}

/* Tariff cards */
.hh-tariffs {
    margin: 0 0 20px;
}

.hh-tariff-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hh-tariff-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.hh-tariff-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.hh-tariff-card__header {
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.hh-tariff--start {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.hh-tariff--pro {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.hh-tariff--unlimited {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.hh-tariff-card__body {
    padding: 16px;
    text-align: center;
}

.hh-tariff-card__price {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.hh-tariff-card__period {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

.hh-tariff-card__budget {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.hh-tariff-card__tours {
    font-size: 13px;
    color: #718096;
}

.hh-tariff-card__saving {
    font-size: 12px;
    color: #38a169;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* Tariff groups */
.hh-tariff-group {
    margin-bottom: 24px;
}

.hh-tariff-group__title {
    margin: 0 0 12px;
    padding: 8px 16px;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.hh-tariff-group__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* Override grid layout for tariffs container when using groups */
.hh-tariffs-period .hh-tariff-group:last-child {
    margin-bottom: 0;
}

.hh-tariffs-period {
    display: block;
}

/* Promo section */
.hh-promo-section {
    margin: 16px 0;
}

.hh-promo-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.hh-promo-row {
    display: flex;
    gap: 10px;
}

.hh-promo-row .hh-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
}

.hh-promo-result {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 4px;
}

.hh-promo-result.success {
    color: #22543d;
    background: #c6f6d5;
}

.hh-promo-result.error {
    color: #c53030;
    background: #fed7d7;
}

/* Бронирования */
.hotelhack-bookings {
    margin: 20px 0;
}

.bookings-list {
    display: grid;
    gap: 20px;
}

.booking-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.booking-status.confirmed {
    color: #4CAF50;
}

.booking-status.pending {
    color: #ed8936;
}

.booking-status.cancelled {
    color: #e53e3e;
}

.booking-status.completed {
    color: #4299e1;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.discount {
    background: #f44336;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
}

.price-final {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
}

/* Избранное */
.hotelhack-favorites {
    margin: 20px 0;
}

.favorites-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.favorites-tabs .tab {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
}

.favorites-tabs .tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.favorites-list {
    display: grid;
    gap: 15px;
}

.favorite-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.favorite-item h4 {
    margin: 0;
    flex: 1;
}

/* Промокод */
.hotelhack-promocode {
    margin: 20px 0;
}

.promocode-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.promocode-code {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.promocode-code input {
    flex: 1;
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #667eea;
    border-radius: 4px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Override Hello Elementor theme [type="submit"] styles */
button.btn.btn-primary,
button.btn.btn-primary[type="submit"],
input.btn.btn-primary[type="submit"],
a.btn.btn-primary {
    color: #ffffff !important;
    border: none !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

/* Override Hello Elementor theme */
button.btn.btn-secondary,
button.btn.btn-secondary[type="button"],
a.btn.btn-secondary {
    color: #4a5568 !important;
    border: none !important;
    background: #edf2f7 !important;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #f56565;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn-telegram:hover {
    background: #006da3;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1ebd5a;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 640px) {
    .hh-tariff-group__cards {
        grid-template-columns: 1fr;
    }

    .hh-promo-row {
        flex-direction: column;
    }

    .subscription-actions {
        flex-direction: column;
    }

    .share-buttons {
        flex-direction: column;
    }

    .promocode-code {
        flex-direction: column;
    }

    .promocode-code input {
        font-size: 18px;
    }
}
