MediaWiki:Gadget-TripleTabView Styles.css

From wikishia

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
.TripleTabView {
    width: 100%;
    max-width: 85%;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Styles */
.tab-header {
    display: flex;
    justify-content: space-around;
    background: #f7f7f7;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab-header div {
    flex-grow: 1;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    font-weight: bold;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.tab-header div:hover {
    background: #f0f0f0;
}

.tab-header div.active {
    border-bottom: 4px solid #ffd700;
    color: #333;
    background: #fff;
    font-weight: bold;
}

/* Wrapper for smooth height transition */
.tab-wrapper {
    position: relative;
    transition: height 0.4s ease; /* Smooth height transition */
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    overflow-y: auto; /* Enable scrolling for long content */
    max-height: 450px; /* Set a maximum height for the content */
}

.tab-content.active {
    display: block;
}

/* Card Styles */
.tab-content .content-card {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content .content-card h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: right;
}

.tab-content .content-card p {
    font-size: 16px;
    color: #444;
    text-align: right;
}

.tab-content.text-tab-content {
    font-family: 'AdobeArabic-Regular', sans-serif !important;
    font-size: 20px !important;
}

html[dir="ltr"] #translate .content-card p {
    text-align: left !important;
    direction: ltr !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .TripleTabView {
        max-width: unset;
        width: 100%;
        margin: 10px auto;
        /*box-shadow: none;*/
    }

    .tab-header div {
        font-size: 14px;
        padding: 12px 8px;
    }

     .tab-content {
        padding: 10px 0 2px 0;
     }

    .tab-content .content-card h3 {
        font-size: 16px;
    }

    .tab-content .content-card p {
        font-size: 14px;
    }

    .tab-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .TripleTabView {
        max-width: unset;
        width: 100%;
        margin: 10px auto;
        /*box-shadow: none;*/
    }

    .tab-header div {
        font-size: 12px;
        padding: 10px;
    }

     .tab-content {
        padding: 10px 0 2px 0;
     }

    .tab-content .content-card h3 {
        font-size: 14px;
    }

    .tab-content .content-card p {
        font-size: 12px;
    }
}