// variables
$overlay-color: rgba(0, 0, 0, 0.15);
$border-radius: 6px;

// date-time
.elespare-date-time-widget {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    .elespare-date-time {
        display: flex;
        // align-items: center;
        overflow: hidden;

        .elespare-icon-wrapper {
            display: flex;
            align-items: center;
        }
        .elespare-date {
            align-self: center;
        }
    }
}

// layout-01
.elespare-date-time-widget {
    &.date-time-style-1 {
        .elespare-date-time {
            gap: 5px;
        }
    }
}

// layout-02
.elespare-date-time-widget {
    &.date-time-style-2 {
        .elespare-date-time {
            gap: 10px;
            padding: 5px 10px;
        }
    }
}

// layout-03
.elespare-date-time-widget {
    &.date-time-style-3 {
        .elespare-date-time {
            gap: 10px;
            padding: 5px 10px;
            border-radius: $border-radius;
        }
    }
}

// layout-04
.elespare-date-time-widget {
    &.date-time-style-4 {
        .elespare-date-time {
            border-radius: 0 $border-radius 0 $border-radius;
            .elespare-icon-wrapper {
                padding: 5px 10px;
                border-right: 1px solid $overlay-color;
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-05
.elespare-date-time-widget {
    &.date-time-style-5 {
        .elespare-date-time {
            border-radius: 100px;
            overflow: hidden;
            .elespare-icon-wrapper {
                padding: 5px 10px 5px 12px;
                background-color: $overlay-color;
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-06
.elespare-date-time-widget {
    &.date-time-style-6 {
        .elespare-date-time {
            gap: 10px;
            border-radius: 0 $border-radius $border-radius $border-radius;
            overflow: hidden;
            .elespare-icon-wrapper {
                padding: 5px 10px;
                background-color: $overlay-color;
                position: relative;
                &::after {
                    content: "";
                    border: 8px solid;
                    border-color: transparent transparent transparent $overlay-color;
                    position: absolute;
                    top: 50%;
                    left: 100%;
                    transform: translateY(-50%);
                }
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-07
.elespare-date-time-widget {
    &.date-time-style-7 {
        .elespare-date-time {
            border-radius: $border-radius 0 0 0;
            overflow: hidden;
            .elespare-icon-wrapper {
                clip-path: polygon(0 0, 100% 0%, 75% 100%, 0% 100%);
                padding: 5px 20px 5px 12px;
                background-color: $overlay-color;
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-08
.elespare-date-time-widget {
    &.date-time-style-8 {
        .elespare-date-time {
            border-radius: 100px;
            overflow: hidden;
            .elespare-icon-wrapper {
                clip-path: polygon(0 0, 75% 0, 100% 100%, 0% 100%);
                padding: 5px 20px 5px 12px;
                background-color: $overlay-color;
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-09
.elespare-date-time-widget {
    &.date-time-style-9 {
        .elespare-date-time {
            align-items: flex-start;
            border-radius: $border-radius;
            .elespare-icon-wrapper {
                padding: 0 0 5px 10px;
                i{
                    background-color: $overlay-color;
                    border-radius: 0 0 100px 100px;
                    padding: 15px 10px 10px 10px;
                    display: inline-block;
                    text-align: center;
                    line-height: 1;
                }
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}


// layout-10
.elespare-date-time-widget {
    &.date-time-style-10 {
        .elespare-date-time {
            border-radius: $border-radius;
            overflow: hidden;
            .elespare-icon-wrapper {
                clip-path: polygon(0% 0%, 75% 0, 100% 50%, 75% 100%, 0% 100%);
                padding: 5px 20px 5px 12px;
                background-color: $overlay-color;
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-11
.elespare-date-time-widget {
    &.date-time-style-11 {
        .elespare-date-time {
            border-radius: $border-radius 0 $border-radius 0;
            overflow: hidden;
            .elespare-icon-wrapper {
                padding: 3px 0 3px 5px;
                i {
                    clip-path: circle(45% at 50% 50%);
                    padding: 12px;
                    background-color: $overlay-color;
                    display: inline-block;
                    line-height: 1;
                }
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// layout-12
.elespare-date-time-widget {
    &.date-time-style-12 {
        .elespare-date-time {
            border-radius: $border-radius $border-radius 0 0;
            overflow: hidden;
            .elespare-icon-wrapper {
                padding: 5px 0 5px 5px;
                i {
                    clip-path: circle(50% at 50% 50%);
                    padding: 7px 8px;
                    border: 2px solid currentColor;
                    display: inline-block;
                    line-height: 1;
                    border-radius: 50%;
                }
            }
            .elespare-date, .elespare-time-text {
                padding: 5px 10px;
                display: inline-block;
            }
        }
    }
}

// border-radius

.elespare-date-time-widget {
    &.date-time-rounded {
        .elespare-date-time {
            border-radius: $border-radius;
        }
    }
    &.date-time-circular {
        .elespare-date-time {
            border-radius: 100px;
        }
        &:not(.date-time-style-2, .date-time-style-3, .date-time-style-11, .date-time-style-12) {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding-left: 12px;
                }
            }
        }
        &.date-time-style-2, &.date-time-style-3 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding-left: 2px;
                }
            }
        }
        &.date-time-style-11, &.date-time-style-12 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding-left: 7px;
                }
            }
        }
    }
    &.date-time-rectangular {
        .elespare-date-time {
            border-radius: 0;
        }
    }
}

// order

.elespare-date-time-widget {
    &.date-time-order-2 {
        .elespare-date-wrapper {
            order: 1;
        }
    }
}

// Layout Style

.elespare-date-time-widget {
    &.date-time-vertical {
        flex-direction: column;
        align-items: flex-start;
    }
}

// Alignment

.elespare-section-title-elespare {
    &-left {
        .elespare-date-time-widget {
            justify-content: flex-start;
            &.date-time-vertical {
                align-items: flex-start;
            }
        }  
    }
    &-center {
        .elespare-date-time-widget {
            justify-content: center;
            &.date-time-vertical {
                justify-content: flex-start;
                align-items: center;
            }
        } 
    }
    &-right {
        .elespare-date-time-widget {
            justify-content: flex-end;
            &.date-time-vertical {
                justify-content: flex-start;
                align-items: flex-end;
            }
        } 
    }
}

@media screen and (max-width: 768px) {
    .elespare-section-title-tablet-elespare{ 
        &-left {
            .elespare-date-time-widget {
                justify-content: flex-start;
                &.date-time-vertical {
                    align-items: flex-start;
                }
            }  
        }
        &-center {
            .elespare-date-time-widget {
                justify-content: center;
                &.date-time-vertical {
                    justify-content: flex-start;
                    align-items: center;
                }
            } 
        }
        &-right {
            .elespare-date-time-widget {
                justify-content: flex-end;
                &.date-time-vertical {
                    justify-content: flex-start;
                    align-items: flex-end;
                }
            } 
        }
    }
}

@media screen and (max-width: 480px) {
    .elespare-section-title-mobile-elespare { 
        &-left {
            .elespare-date-time-widget {
                justify-content: flex-start;
                &.date-time-vertical {
                    align-items: flex-start;
                }
            }  
        }
        &-center {
            .elespare-date-time-widget {
                justify-content: center;
                &.date-time-vertical {
                    justify-content: flex-start;
                    align-items: center;
                }
            } 
        }
        &-right {
            .elespare-date-time-widget {
                justify-content: flex-end;
                &.date-time-vertical {
                    justify-content: flex-start;
                    align-items: flex-end;
                }
            } 
        } 
    }
}

body.rtl{

    // layout-04
    .elespare-date-time-widget {
        &.date-time-style-4 {
            .elespare-date-time {
                border-radius: $border-radius 0 $border-radius 0;
                .elespare-icon-wrapper {
                    border-right: none;
                    border-left: 1px solid $overlay-color;
                }
            }
        }
    }

    // layout-05
    .elespare-date-time-widget {
        &.date-time-style-5 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding: 5px 12px 5px 10px;
                }
            }
        }
    }

    // layout-06
    .elespare-date-time-widget {
        &.date-time-style-6 {
            .elespare-date-time {
                border-radius: $border-radius 0 $border-radius $border-radius;
                .elespare-icon-wrapper {
                    &::after {
                        border-color: transparent $overlay-color transparent transparent;
                        left: auto;
                        right: 100%;
                    }
                }
            }
        }
    }

    // layout-07
    .elespare-date-time-widget {
        &.date-time-style-7 {
            .elespare-date-time {
                border-radius: 0 $border-radius 0 0;
                .elespare-icon-wrapper {
                    clip-path: polygon(0 0, 100% 0%, 100% 100%, 25% 100%);
                    padding: 5px 12px 5px 20px;
                }
            }
        }
    }

    // layout-08
    .elespare-date-time-widget {
        &.date-time-style-8 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
                    padding: 5px 12px 5px 20px;
                }
            }
        }
    }

    // layout-09
    .elespare-date-time-widget {
        &.date-time-style-9 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding: 0 10px 5px 0;
                }
            }
        }
    }

    // layout-10
    .elespare-date-time-widget {
        &.date-time-style-10 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    clip-path: polygon(25% 0%, 100% 0%, 100% 100%, 25% 100%, 0% 50%);
                    padding: 5px 12px 5px 20px;
                }
            }
        }
    }

    // layout-11
    .elespare-date-time-widget {
        &.date-time-style-11 {
            .elespare-date-time {
                border-radius: 0 $border-radius 0 $border-radius;
                .elespare-icon-wrapper {
                    padding: 3px 5px 3px 0;
                }
            }
        }
    }

    // layout-12
    .elespare-date-time-widget {
        &.date-time-style-12 {
            .elespare-date-time {
                .elespare-icon-wrapper {
                    padding: 5px 5px 5px 0;
                }
            }
        }
    }

    // border-radius
    .elespare-date-time-widget {
        &.date-time-rounded {
            .elespare-date-time {
                border-radius: $border-radius;
            }
        }
        &.date-time-circular {
            .elespare-date-time {
                border-radius: 100px;
            }
            &.date-time-style-2, &.date-time-style-3 {
                .elespare-date-time {
                    .elespare-icon-wrapper {
                        padding-left: 0;
                        padding-right: 2px;
                    }
                }
            }
            .date-time-style-4, .date-time-style-5, .date-time-style-6, .date-time-style-9{
                .elespare-date-time {
                    .elespare-icon-wrapper {
                        padding-left: 10px;
                        padding-right: 12px;
                    }
                }
            }

            .date-time-style-7, .date-time-style-8, .date-time-style-10 {
                .elespare-date-time {
                    .elespare-icon-wrapper {
                        padding-left: 20px;
                        padding-right: 12px;
                    }
                }
            }
            
            &.date-time-style-11, &.date-time-style-12 {
                .elespare-date-time {
                    .elespare-icon-wrapper {
                        padding-left: 0;
                        padding-right: 7px;
                    }
                }
            }
        }
        &.date-time-rectangular {
            .elespare-date-time {
                border-radius: 0;
            }
        }
    }

    // Alignment
    .elespare-section-title-elespare {
        &-left {
            .elespare-date-time-widget {
                justify-content: flex-end;
                &.date-time-vertical {
                    align-items: flex-end;
                }
            }  
        }
        &-center {
            .elespare-date-time-widget {
                justify-content: center;
                &.date-time-vertical {
                    justify-content: flex-end;
                    align-items: center;
                }
            } 
        }
        &-right {
            .elespare-date-time-widget {
                justify-content: flex-start;
                &.date-time-vertical {
                    justify-content: flex-end;
                    align-items: flex-start;
                }
            } 
        }
    }
    @media screen and (max-width: 768px) {
        .elespare-section-title-tablet-elespare{ 
            &-left {
                .elespare-date-time-widget {
                    justify-content: flex-end;
                    &.date-time-vertical {
                        align-items: flex-end;
                    }
                }  
            }
            &-center {
                .elespare-date-time-widget {
                    justify-content: center;
                    &.date-time-vertical {
                        justify-content: flex-end;
                        align-items: center;
                    }
                } 
            }
            &-right {
                .elespare-date-time-widget {
                    justify-content: flex-start;
                    &.date-time-vertical {
                        justify-content: flex-end;
                        align-items: flex-start;
                    }
                } 
            }
        }
    }
    
    @media screen and (max-width: 480px) {
        .elespare-section-title-mobile-elespare { 
            &-left {
                .elespare-date-time-widget {
                    justify-content: flex-end;
                    &.date-time-vertical {
                        align-items: flex-end;
                    }
                }  
            }
            &-center {
                .elespare-date-time-widget {
                    justify-content: center;
                    &.date-time-vertical {
                        justify-content: flex-end;
                        align-items: center;
                    }
                } 
            }
            &-right {
                .elespare-date-time-widget {
                    justify-content: flex-start;
                    &.date-time-vertical {
                        justify-content: flex-end;
                        align-items: flex-start;
                    }
                } 
            } 
        }
    }
    
}