/* ==================================================
   TAOS Planes y Precios - Frontend Styles
   ================================================== */

.taos-planes-front {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Domain Alert */
.taos-domain-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 15px;
    color: #166534;
}

.taos-domain-alert-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.taos-domain-alert-text {
    line-height: 1.5;
}

.taos-domain-alert-text strong {
    color: #15803d;
}

/* Period Toggle */
.taos-period-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 35px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 14px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.taos-period-btn {
    flex: 1;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    background: transparent;
}

.taos-period-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.taos-period-btn:not(.active):hover {
    color: #334155;
}

/* Plans Grid */
.taos-plans-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.taos-grid-1 { grid-template-columns: 1fr; }
.taos-grid-2 { grid-template-columns: repeat(2, 1fr); }
.taos-grid-3 { grid-template-columns: repeat(3, 1fr); }
.taos-grid-4 { grid-template-columns: repeat(4, 1fr); }
.taos-grid-5 { grid-template-columns: repeat(2, 1fr); }
.taos-grid-6 { grid-template-columns: repeat(3, 1fr); }

/* Plan Card */
.taos-plan-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.taos-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.taos-plan-popular {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: scale(1.04);
    z-index: 2;
}

.taos-plan-popular:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.25);
}

.taos-plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #3b82f6;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Plan Header */
.taos-plan-header {
    padding: 30px 24px 20px;
    color: #ffffff;
    text-align: center;
}

.taos-plan-emoji {
    font-size: 42px;
    margin-bottom: 12px;
    line-height: 1;
}

.taos-plan-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.taos-plan-tagline {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Plan Price */
.taos-plan-price-box {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.taos-plan-price {
    font-size: 14px;
    color: #64748b;
}

.taos-price-amount {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
}

.taos-plan-period {
    font-size: 14px;
    color: #94a3b8;
}

/* Plan Features */
.taos-plan-features {
    list-style: none;
    margin: 0;
    padding: 24px;
    flex: 1;
}

.taos-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    border-bottom: 1px solid #f8fafc;
}

.taos-plan-features li:last-child {
    border-bottom: none;
}

.taos-feature-star {
    color: #f59e0b;
    flex-shrink: 0;
    font-size: 14px;
}

/* Plan Footer */
.taos-plan-footer {
    padding: 20px 24px 28px;
    text-align: center;
}

.taos-plan-btn {
    width: 100%;
    padding: 14px 24px;
    border: 2px solid;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.taos-plan-btn:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.taos-plan-btn:active {
    transform: translateY(0);
}

/* Domain Checker Section */
.taos-domain-checker-section {
    margin-top: 20px;
    padding: 20px 0;
}

.taos-domain-checker-section hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.taos-domain-checker-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin: 0 0 20px 0;
}

/* Error States */
.taos-error {
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* ================================================
   MODALS - Domain & Subscription
   ================================================ */

/* --- Shared Modal Base --- */
.taos-domain-modal,
.taos-sub-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: taosFadeIn 0.25s ease;
    box-sizing: border-box !important;
}

/* Lock body scroll when modal is open */
body.taos-modal-open {
    overflow: hidden !important;
}

@keyframes taosFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes taosSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================================
   DOMAIN MODAL
   ================================================ */
.taos-domain-modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    padding: 40px 36px 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    animation: taosSlideUp 0.35s ease;
}

.taos-domain-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.taos-domain-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

.taos-domain-modal-icon {
    font-size: 56px;
    margin-bottom: 12px;
    line-height: 1;
}

.taos-domain-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}

.taos-domain-modal-desc {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Domain options buttons */
.taos-domain-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.taos-domain-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.taos-domain-option-btn:hover {
    border-color: #3b82f6;
    background: #f8faff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}

.taos-domain-option-btn:active {
    transform: translateY(0);
}

.taos-domain-option-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.taos-domain-option-text {
    flex: 1;
}

.taos-domain-si-btn {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.taos-domain-si-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.2);
}

.taos-domain-no-btn {
    border-color: #dbeafe;
    background: #eff6ff;
}

.taos-domain-no-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

/* Domain input section */
.taos-domain-input-section {
    text-align: left;
    animation: taosSlideUp 0.3s ease;
}

.taos-domain-input-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.taos-domain-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.taos-domain-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
}

.taos-domain-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    background: #fff;
}

.taos-domain-input::placeholder {
    color: #94a3b8;
}

.taos-domain-confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.taos-domain-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.taos-domain-confirm-btn:active {
    transform: translateY(0);
}

.taos-domain-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 10px 0 0;
}

.taos-domain-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s;
}

.taos-domain-back-btn:hover {
    color: #3b82f6;
}

/* ================================================
   SUBSCRIPTION MODAL
   ================================================ */
.taos-sub-modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: taosSlideUp 0.35s ease;
}

.taos-sub-modal-content::-webkit-scrollbar {
    width: 6px;
}

.taos-sub-modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.taos-sub-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.taos-sub-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.taos-sub-modal-header {
    padding: 24px 28px 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.taos-sub-modal-header-icon {
    font-size: 40px;
    margin-bottom: 8px;
    line-height: 1;
}

.taos-sub-modal-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    padding-right: 32px;
}

.taos-sub-plan-name {
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
}

.taos-sub-header-desc {
    margin: 10px 0 0;
    font-size: 14px;
    opacity: 0.9;
    color: #fff;
}

.taos-sub-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.taos-sub-modal-close:hover {
    background: rgba(255,255,255,0.35);
    transform: rotate(90deg);
}

.taos-sub-modal-body {
    padding: 24px 28px;
}

.taos-sub-domain-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #166534;
}

.taos-sub-modal-body .taos-form-group {
    margin-bottom: 18px;
}

.taos-sub-modal-body label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 14px;
}

.taos-required {
    color: #ef4444;
}

.taos-sub-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.taos-sub-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.taos-sub-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.taos-sub-modal-body textarea.taos-sub-input {
    resize: vertical;
    min-height: 70px;
}

.taos-sub-modal-body select.taos-sub-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
		width: 130px;
  box-sizing: border-box;
}

/* Input with prefix (Facebook, Instagram, WhatsApp) */
.taos-input-prefix {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    transition: all 0.2s;
}

.taos-input-prefix:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.taos-input-prefix-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    border-right: 1.5px solid #e2e8f0;
    white-space: nowrap;
}

.taos-sub-input-prefix {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    flex: 1;
    padding: 11px 14px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    min-width: 0;
}

.taos-sub-input-prefix:focus {
    box-shadow: none !important;
    background: transparent !important;
}

/* Radio group */
.taos-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.taos-radio-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500 !important;
    font-size: 14px;
    color: #475569;
    margin-bottom: 0 !important;
}

.taos-radio-label:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.taos-radio-label input[type="radio"] {
    display: none;
}

.taos-radio-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.taos-radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.taos-radio-label input[type="radio"]:checked + .taos-radio-custom {
    border-color: #3b82f6;
}

.taos-radio-label input[type="radio"]:checked + .taos-radio-custom::after {
    transform: scale(1);
}

.taos-radio-label:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: #f0f5ff;
}

.taos-field-note {
    font-size: 13px;
    color: #94a3b8;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* Subscription modal footer */
.taos-sub-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    border-radius: 0 0 20px 20px;
}

.taos-sub-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.taos-sub-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.taos-sub-btn:active {
    transform: translateY(0);
}

.taos-sub-btn-cancel {
    background: #f1f5f9;
    color: #64748b;
    background-image: none;
}

.taos-sub-btn-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    transform: none;
    box-shadow: none;
}

/* Loading spinner */
.taos-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: taos-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes taos-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .taos-grid-4,
    .taos-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .taos-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .taos-plans-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .taos-plan-popular {
        transform: none;
    }

    .taos-plan-popular:hover {
        transform: translateY(-4px);
    }

    .taos-plan-header {
        padding: 24px 20px 16px;
    }

    .taos-plan-price-box {
        padding: 20px;
    }

    .taos-price-amount {
        font-size: 28px;
    }

    .taos-plan-features {
        padding: 20px;
    }

    .taos-plan-footer {
        padding: 16px 20px 24px;
    }

    .taos-period-toggle {
        max-width: 100%;
    }
}
