/* ========================================
   SHARED COMPONENTS CSS
   Classes comuns reutilizáveis em todo o projeto
   ======================================== */

/* ========================================
   FEATURE ITEM COMPONENT
   ======================================== */
.feature-item {

    gap: 0.75rem;
    font-size: 0.8rem;
}

.feature-item i {
    color: var(--color-main);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.feature-item span {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Network specific feature item styles */
.network-plan-card .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    justify-content: center;
}

.network-plan-card .feature-item i {
    color: #8B5CF6;
    font-size: 1.1rem;
}

.network-plan-card.selected .feature-item i {
    color: white;
}

.network-plan-card .feature-item span {
    color: #374151;
    font-weight: 500;
}

.network-plan-card.selected .feature-item span {
    color: white;
}

/* ========================================
   PAGE NAVIGATION COMPONENT
   ======================================== */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.page-navigation .btn-back {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #6B7280;
    border: 1px solid rgba(229, 231, 235, 0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    min-width: auto;
    width: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-navigation .btn-back:hover {
    background: rgba(243, 244, 246, 0.95);
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-navigation .btn-back:active {
    transform: translateY(0) scale(0.98);
}

.page-navigation .btn-skip,
.page-navigation .btn-continue {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    min-width: auto;
    width: auto !important;
    box-shadow: 0 4px 15px rgba(131, 59, 246, 0.3);
}

.page-navigation .btn-skip:hover,
.page-navigation .btn-continue:hover {
    background: var(--gradient-main-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.page-navigation .btn-skip:active,
.page-navigation .btn-continue:active {
    transform: translateY(0) scale(0.98);
}

/* Network specific navigation button */
.page-navigation .btn-continue {
    background: var(--gradient-main);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.page-navigation .btn-continue:hover {
    background: var(--gradient-main-hover);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ========================================
   LINES COUNTER COMPONENT
   ======================================== */
.lines-counter {
    margin-bottom: 0,5rem;
    margin-top: 0,5rem;
}

.lines-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;

    text-align: center;
}

.counter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.counter-btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    min-width: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: var(--gradient-main-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.counter-btn:active {
    transform: translateY(0) scale(0.95);
}

.lines-input {
    width: 100%;
    height: 35px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1F2937;
    background: white;
    transition: border-color 0.3s ease;
}

.lines-input:focus {
    outline: none;
    border-color: var(--color-main);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Plans specific counter styles */
.plans-selection .counter-btn {
    background: var(--gradient-main);
    width: 40px;
    min-width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.plans-selection .counter-btn:hover {
    background: var(--gradient-main-hover);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.plans-selection .lines-input {
    width: 100%;
    height: 40px;
    font-size: 1rem;
}

.plans-selection .lines-input:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ========================================
   COST DISPLAY COMPONENT
   ======================================== */



.cost-label {
    font-size: 0.9rem;
    color: #6B7280;
}

.cost-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #8B5CF6;
}

.cost-info {
    color: #6B7280;
    cursor: pointer;
}



.devices-selection .cost-display .cost-amount {
    color: var(--color-main);
}

/* ========================================
   MODAL OVERLAY COMPONENT
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 750px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
}

.modal-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #6B7280;
    font-size: 1.1rem;
}

.modal-body {
    margin-bottom: 0.5rem;
}

.modal-body .form-field {
    margin-bottom: 1.5rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.modal-body input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-body input:focus {
    outline: none;
    border-color: #8B5CF6;
}

.btn-modal-continue {
    background: #8B5CF6;
    color: white;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.btn-modal-continue:hover {
    background: #6D28D9;
}

.btn-modal-continue:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* ========================================
   CARD SELECTED STATE COMPONENT
   ======================================== */
.card-selected {
    border-color: #8B5CF6;
    border-width: 3px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(109, 40, 217, 0.05) 100%);
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.card-selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #8B5CF6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 10;
    animation: checkmarkBounce 0.6s ease-out;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Specific card selected states */
.addon-card.selected {
    border-color: var(--color-main);
   
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    box-shadow:
        0 20px 60px rgba(59, 130, 246, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

.addon-card.selected::after {
    background: var(--color-main);
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

.network-plan-card.selected {
    border-color: #8B5CF6;
    border-width: 3px;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    color: white;
}

.network-plan-card.selected::after {
    background: var(--color-secondary);
    color: #8B5CF6;
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
}

.plan-card.selected {
    border-color: #8B5CF6;
 
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(109, 40, 217, 0.05) 100%);
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.device-card.selected {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(109, 40, 217, 0.05) 100%);
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.device-card.selected::after {
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes checkmarkBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .page-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .page-navigation .btn-back,
    .page-navigation .btn-skip,
    .page-navigation .btn-continue {
        width: 100% !important;
    }

    .lines-counter {
        padding: 0.75rem;
    }

    .counter-btn {
        min-width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .btn-modal-continue {
        padding: 0.9rem 2rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   ALERT
   ======================================== */
.alert {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 20px;
}

.alert-icon {
    background: #ff9500;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

.alert-text {
    color: #856404;
    font-weight: 500;
}

/* ========================================
   SELECT2
   ======================================== */
.select2-container--default .select2-selection--single {
    border: 1px solid #ced4da;
    border-radius: 4px;
    height: 60px;
    padding: 18px 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 24px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}
