/* Process Steps Widget Styles */

.psw-process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Step Status Styles */
.psw-step-status-pending .psw-step-icon,
.psw-step-status-pending .psw-step-number {
    background-color: #ffc107 !important;
}

.psw-step-status-active .psw-step-icon,
.psw-step-status-active .psw-step-number {
    background-color: #007cba !important;
}

.psw-step-status-completed .psw-step-icon,
.psw-step-status-completed .psw-step-number {
    background-color: #28a745 !important;
}

.psw-step-status-error .psw-step-icon,
.psw-step-status-error .psw-step-number {
    background-color: #dc3545 !important;
}

/* Progress Bar Styles */
.psw-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.psw-progress-bar-fill {
    height: 100%;
    background-color: #007cba;
    border-radius: 3px;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.psw-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Badge Styles */
.psw-step-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff6b6b;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Vertical Layout */
.psw-layout-vertical .psw-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.psw-layout-vertical .psw-step:last-child {
    margin-bottom: 0;
}

.psw-layout-vertical .psw-step-header {
    flex-shrink: 0;
    margin-right: 20px;
    position: relative;
}

.psw-layout-vertical .psw-step-content {
    flex: 1;
    min-width: 0;
}

.psw-layout-vertical .psw-connector {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    height: 30px;
    background-color: #007cba;
    z-index: 1;
}

.psw-layout-vertical .psw-connector::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #007cba;
}

.psw-layout-vertical .psw-connector.psw-connector-dashed {
    background: repeating-linear-gradient(
        to bottom,
        #007cba 0,
        #007cba 4px,
        transparent 4px,
        transparent 8px
    );
}

.psw-layout-vertical .psw-connector.psw-connector-arrow::before {
    border-top-color: #007cba;
}

/* Horizontal Layout */
.psw-layout-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.psw-layout-horizontal .psw-step {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
    text-align: center;
    position: relative;
}

.psw-layout-horizontal .psw-step-header {
    margin-right: 0;
    margin-bottom: 15px;
    justify-content: center;
}

.psw-layout-horizontal .psw-connector {
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 2px;
    background-color: #007cba;
    z-index: 1;
}

.psw-layout-horizontal .psw-connector::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid #007cba;
}

.psw-layout-horizontal .psw-connector.psw-connector-dashed {
    background: repeating-linear-gradient(
        to right,
        #007cba 0,
        #007cba 4px,
        transparent 4px,
        transparent 8px
    );
}

.psw-layout-horizontal .psw-connector.psw-connector-arrow::before {
    border-left-color: #007cba;
}

/* Grid Layout */
.psw-layout-grid {
    display: grid;
    gap: 30px;
}

.psw-layout-grid.psw-columns-1 {
    grid-template-columns: 1fr;
}

.psw-layout-grid.psw-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.psw-layout-grid.psw-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.psw-layout-grid.psw-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.psw-layout-grid.psw-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.psw-layout-grid.psw-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.psw-layout-grid .psw-step {
    margin-bottom: 0;
    text-align: center;
}

.psw-layout-grid .psw-step-header {
    margin-right: 0;
    margin-bottom: 15px;
    justify-content: center;
}

.psw-layout-grid .psw-connector {
    display: none;
}

/* Step Content */
.psw-step-content {
    position: relative;
}

.psw-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.psw-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    z-index: 2;
}

.psw-step-icon i,
.psw-step-icon svg {
    color: #007cba;
    fill: #007cba;
}

.psw-step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #007cba;
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
}

.psw-step-body {
    flex: 1;
}

.psw-step-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #333333;
}

.psw-step-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
}

.psw-step-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .psw-layout-grid.psw-columns-4,
    .psw-layout-grid.psw-columns-5,
    .psw-layout-grid.psw-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .psw-layout-horizontal .psw-step {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .psw-layout-grid.psw-columns-3,
    .psw-layout-grid.psw-columns-4,
    .psw-layout-grid.psw-columns-5,
    .psw-layout-grid.psw-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .psw-layout-horizontal {
        flex-direction: column;
    }
    
    .psw-layout-horizontal .psw-step {
        margin-bottom: 30px;
        min-width: auto;
    }
    
    .psw-layout-horizontal .psw-connector {
        display: none;
    }
    
    .psw-layout-vertical .psw-step {
        flex-direction: column;
        text-align: center;
    }
    
    .psw-layout-vertical .psw-step-header {
        margin-right: 0;
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .psw-layout-vertical .psw-connector {
        display: none;
    }
}

@media (max-width: 480px) {
    .psw-layout-grid.psw-columns-2,
    .psw-layout-grid.psw-columns-3,
    .psw-layout-grid.psw-columns-4,
    .psw-layout-grid.psw-columns-5,
    .psw-layout-grid.psw-columns-6 {
        grid-template-columns: 1fr;
    }
    
    .psw-step-icon {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .psw-step-title {
        font-size: 16px;
    }
    
    .psw-step-description {
        font-size: 13px;
    }
}

/* Hover Effects */
.psw-step:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.psw-step-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Animation Classes */
.psw-step {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.psw-step:nth-child(1) { animation-delay: 0.1s; }
.psw-step:nth-child(2) { animation-delay: 0.2s; }
.psw-step:nth-child(3) { animation-delay: 0.3s; }
.psw-step:nth-child(4) { animation-delay: 0.4s; }
.psw-step:nth-child(5) { animation-delay: 0.5s; }
.psw-step:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .psw-connector {
        display: none !important;
    }
    
    .psw-step {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Enhanced Animation Classes */
.psw-animations-enabled .psw-step {
    opacity: 0;
    transform: translateY(20px);
}

.psw-animations-enabled.psw-animation-fade-in .psw-step {
    animation: pswFadeIn 0.6s ease forwards;
}

.psw-animations-enabled.psw-animation-slide-up .psw-step {
    animation: pswSlideUp 0.6s ease forwards;
}

.psw-animations-enabled.psw-animation-slide-left .psw-step {
    animation: pswSlideLeft 0.6s ease forwards;
}

.psw-animations-enabled.psw-animation-zoom-in .psw-step {
    animation: pswZoomIn 0.6s ease forwards;
}

.psw-animations-enabled.psw-animation-bounce .psw-step {
    animation: pswBounce 0.8s ease forwards;
}

/* Animation Delays */
.psw-animations-enabled .psw-step:nth-child(1) { animation-delay: 0.1s; }
.psw-animations-enabled .psw-step:nth-child(2) { animation-delay: 0.2s; }
.psw-animations-enabled .psw-step:nth-child(3) { animation-delay: 0.3s; }
.psw-animations-enabled .psw-step:nth-child(4) { animation-delay: 0.4s; }
.psw-animations-enabled .psw-step:nth-child(5) { animation-delay: 0.5s; }
.psw-animations-enabled .psw-step:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced Hover Effects */
.psw-hover-effects-enabled .psw-step {
    transition: all 0.3s ease;
}

.psw-hover-effects-enabled[data-hover-effect="lift"] .psw-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.psw-hover-effects-enabled[data-hover-effect="glow"] .psw-step:hover {
    box-shadow: 0 0 30px rgba(0, 124, 186, 0.4);
}

.psw-hover-effects-enabled[data-hover-effect="scale"] .psw-step:hover {
    transform: scale(1.05);
}

.psw-hover-effects-enabled[data-hover-effect="rotate"] .psw-step:hover .psw-step-icon {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

/* Animation Keyframes */
@keyframes pswFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pswSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pswZoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pswBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* Status-specific animations */
.psw-step-status-completed .psw-step-icon {
    animation: pswCompletedPulse 2s infinite;
}

@keyframes pswCompletedPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.psw-step-status-active .psw-step-icon {
    animation: pswActiveGlow 2s infinite;
}

@keyframes pswActiveGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 124, 186, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 124, 186, 0.8); }
}

/* Enhanced Connector Animations */
.psw-connector {
    transition: all 0.5s ease;
}

.psw-connector.psw-connector-animated {
    animation: pswExpandConnector 0.8s ease forwards;
}

@keyframes pswExpandConnector {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .psw-step-badge {
        font-size: 8px;
        padding: 2px 6px;
        top: -5px;
        right: -5px;
    }
    
    .psw-progress-bar {
        height: 4px;
        margin-top: 10px;
    }
}

/* Print Styles Enhancement */
@media print {
    .psw-step-badge {
        background-color: #000 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .psw-progress-bar {
        border: 1px solid #ccc;
    }
    
    .psw-progress-bar-fill {
        background-color: #000 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}
