/**
 * Vertical Tabs Pro Styles
 * File: assets/css/vertical-tabs.css
 */

.vtp-vertical-tabs {
    display: flex;
    min-height: 400px;
    font-family: inherit;
}

/* Navigation Styles */
.vtp-tabs-navigation {
    position: relative;
    padding: 20px;
}

.vtp-tab-item {
    position: relative;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.vtp-tab-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.vtp-tab-item.active {
    background-color: #007cba;
    color: white;
}

/* Connecting Lines */
.vtp-connecting-line {
    position: absolute;
    left: 47px;
    top: -15px;
    height: 30px;
    border-left: 3px solid #ddd; /* Default grey */
    z-index: 1;
}

/* Red connecting lines only between completed/active tabs */
.vtp-tab-item.completed + .vtp-tab-item .vtp-connecting-line,
.vtp-tab-item.active + .vtp-tab-item .vtp-connecting-line {
    border-color: #EF1B25;
}

/* Special case: if current tab is active and previous is completed */
.vtp-tab-item.completed + .vtp-tab-item.active .vtp-connecting-line {
    border-color: #EF1B25;
}

/* Fix gap issue for tabs with subtabs */
.vtp-tab-item:has(.vtp-subtabs) + .vtp-tab-item .vtp-connecting-line {
    top: -25px; /* Extend higher to eliminate gap */
    height: 40px; /* Make longer to bridge the gap */
}

/* Alternative approach for better browser support */
.vtp-tab-item .vtp-subtabs ~ .vtp-tab-item .vtp-connecting-line,
.vtp-tab-item:not(:last-child):has(.vtp-subtabs:not(:empty)) + .vtp-tab-item .vtp-connecting-line {
    top: -25px;
    height: 40px;
}

.vtp-tab-item:first-child .vtp-connecting-line {
    display: none;
}

/* Tab Header */
.vtp-tab-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    position: relative;
    z-index: 2;
}

.vtp-tab-bullet {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #bdc3c7; /* Default light grey */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Active and completed tabs - red color */
.vtp-tab-item.active .vtp-tab-bullet,
.vtp-tab-item.completed .vtp-tab-bullet {
    background: #EF1B25;
    color: white;
}

.vtp-tab-item.active .vtp-tab-bullet {
    transform: scale(1.1);
}

.vtp-tab-bullet i {
    font-size: 16px;
}

.vtp-tab-number {
    font-size: 20px;
    font-weight: bold;
}

.vtp-tab-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    transition: all 0.3s ease;
    color: #333; /* Default dark color */
}

/* Active and completed tabs get red color */
.vtp-tab-item.active .vtp-tab-title,
.vtp-tab-item.completed .vtp-tab-title {
    color: #EF1B25;
}

.vtp-tab-item:hover {
    background-color: rgba(239, 27, 37, 0.1);
}

.vtp-tab-item.active {
    background-color: #EF1B25;
    color: white;
}

/* Subtabs */
.vtp-subtabs {
    margin-left: 47px;
    padding-left: 20px;
    border-left: 3px solid #ddd;
    margin-top: 0px;
    margin-bottom: 10px;
    display: none;
    margin-top: -25px;
    padding-top: 30px;
}

.vtp-tab-item.active .vtp-subtabs {
    display: block; /* Show only when parent tab is active */
    border-left-color: #EF1B25; /* Red when parent is active/completed */
}

.vtp-tab-item.completed .vtp-subtabs {
    border-left-color: #EF1B25; /* Red when parent is completed */
}

.vtp-tab-item.active .vtp-subtabs {
    display: block; /* Show only when parent tab is active */
}

.vtp-subtab-item {
    position: relative;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    /* Remove background colors - wizard style */
}

.vtp-subtab-item:hover {
    background-color: transparent;
}

.vtp-subtab-item.active {
    background-color: transparent;
    border-radius: 4px;
}

.vtp-subtab-connector {
    position: absolute;
    left: -20px;
    top: 50%;
    width: 30px;
    border-top: 2px dotted #ddd; /* Default grey */
    transform: translateY(-50%);
}

/* Red connectors only for active/completed subtabs */
.vtp-subtab-item.active .vtp-subtab-connector,
.vtp-subtab-item.completed .vtp-subtab-connector {
    border-color: #EF1B25;
}

.vtp-subtab-bullet {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #bdc3c7; /* Default light grey */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Active and completed subtabs - red color */
.vtp-subtab-item.active .vtp-subtab-bullet,
.vtp-subtab-item.completed .vtp-subtab-bullet {
    background: #EF1B25;
    color: white;
}

.vtp-subtab-item.active .vtp-subtab-bullet {
    transform: scale(1.1);
}

.vtp-subtab-title {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
}

/* Active and completed subtabs get red color */
.vtp-subtab-item.active .vtp-subtab-title,
.vtp-subtab-item.completed .vtp-subtab-title {
    color: #EF1B25;
    font-weight: 600;
}

/* Content Area */
.vtp-tabs-content {
    position: relative;
    padding: 30px;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    border-left: 3px solid #ef1c26;
    border-radius: 8px;
    box-shadow: 0 0 20px 7px #0000000f;
}

.vtp-tab-content {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    flex: 1;
}

.vtp-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.vtp-subtab-content-area {
    /* Subtab content areas are treated as separate tabs now */
}

/* Navigation Buttons */
.vtp-navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.vtp-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #EF1B25;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.vtp-nav-button:hover:not(:disabled) {
    background-color: #d4161f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 27, 37, 0.3);
}

.vtp-nav-button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vtp-nav-button i {
    font-size: 12px;
}

.vtp-final-button {
    background-color: #27ae60 !important;
}

.vtp-final-button:hover {
    background-color: #219a52 !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vtp-animate-slideInRight {
    animation: slideInRight 0.3s ease forwards;
}

.vtp-animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

.vtp-animate-slideInUp {
    animation: slideInUp 0.3s ease forwards;
}

.vtp-animate-zoomIn {
    animation: zoomIn 0.3s ease forwards;
}

/* Pulse Animation for Active Tab Bullet */
.vtp-tab-item.active .vtp-tab-bullet {
    animation: pulse 2s infinite;
}

.vtp-subtab-item.active .vtp-subtab-bullet {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(239, 27, 37, 0.7);
    }
    70% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(239, 27, 37, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(239, 27, 37, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .vtp-vertical-tabs {
        flex-direction: column;
    }
    
    .vtp-tabs-navigation,
    .vtp-tabs-content {
        width: 100% !important;
    }
    
    .vtp-tabs-navigation {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 20px;
    }
    
    .vtp-connecting-line {
        display: none;
    }
    
    .vtp-subtabs {
        margin-left: 20px;
        padding-left: 15px;
    }

    .vtp-navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .vtp-nav-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .vtp-tab-header {
        padding: 12px 15px;
    }
    
    .vtp-tab-bullet {
        width: 35px;
        height: 35px;
        margin-right: 12px;
        font-size: 14px;
    }
    
    .vtp-tab-title {
        font-size: 14px;
    }
    
    .vtp-tabs-content {
        padding: 20px 15px;
    }

    .vtp-navigation-buttons {
        margin-top: 20px;
        padding-top: 15px;
    }
}