/*
 * Responsive layer for the public default2 template.
 * Loaded after the original theme styles so desktop remains visually close.
 */

*, *:before, *:after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
iframe,
video,
embed,
object {
    max-width: 100%;
}

img {
    height: auto;
}

.mobile-menu-toggle {
    display: none;
}

.content .table-responsive,
.content .table-responsive-wrapper,
.content-page .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content table {
    max-width: 100%;
}

.content input,
.content select,
.content textarea {
    max-width: 100%;
}

.content .form-control {
    max-width: 100%;
}

.content .btn,
.content button,
.content input[type="submit"] {
    white-space: normal;
}

.bp-grid,
.bp-actions {
    max-width: 100%;
}

.cc-selector,
.page-content,
.donaciones-item {
    max-width: 100%;
}

@media (max-width: 1239px) {
    .wrapper {
        width: 100%;
        max-width: 1200px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .web-container {
        gap: 12px;
    }

    .content {
        width: calc(100% - 570px);
        min-width: 0;
    }

    .slider,
    .slider .slides .slide {
        width: 100%;
        max-width: 630px;
    }

    .content-page img {
        max-width: 100%;
    }

    .menu li {
        margin-left: 2px;
        margin-right: 2px;
    }

    .menu a {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 991px) {
    body {
        min-width: 0;
    }

    .top-panel {
        position: relative;
        min-height: 58px;
        padding: 8px 12px;
        background-size: auto 100%;
    }

    .top-panel.flex-c-c {
        display: block;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 8px 12px;
        border: 1px solid rgba(251, 246, 182, 0.45);
        border-radius: 4px;
        background: rgba(35, 20, 39, 0.9);
        color: #fbf6b6;
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background: #fbf6b6;
        box-shadow: 0 6px 0 #fbf6b6, 0 12px 0 #fbf6b6;
    }

    .mobile-menu-toggle span + span,
    .mobile-menu-toggle span + span + span {
        display: none;
    }

    .top-panel .menu {
        display: none;
        height: auto;
        margin-top: 10px;
        padding: 6px 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(21, 12, 24, 0.95);
        border: 1px solid rgba(251, 246, 182, 0.18);
        border-radius: 4px;
    }

    .top-panel.is-open .menu {
        display: flex;
    }

    .menu li {
        width: 100%;
        margin: 0;
    }

    .menu li a:before,
    .menu a:after {
        display: none;
    }

    .menu a {
        height: auto;
        line-height: 1.25;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-align: left;
    }

    .wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .header {
        height: 210px;
        overflow: hidden;
    }

    .logo {
        left: 50%;
        bottom: 18px;
        width: min(320px, 82vw);
        margin-left: 0;
        transform: translateX(-50%);
        text-align: center;
    }

    .logo img {
        max-width: 100%;
    }

    .leaves,
    .slider-effect {
        display: none;
    }

    .web-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .left-sidebar.sidebar {
        order: 1;
        display: flex;
        flex-direction: column;
    }

    .left-sidebar .login-block,
    .left-sidebar .panel-usercp {
        order: -100;
    }

    .left-sidebar .download-block {
        order: -90;
    }

    .left-sidebar .download-block {
        width: 100% !important;
        max-width: 340px !important;
        margin: 12px auto 16px auto !important;
        overflow: hidden;
        float: none !important;
        box-sizing: border-box;
    }

    .left-sidebar .download-block a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 90px;
        height: auto !important;
        padding: 16px 14px !important;
        background-size: cover !important;
        background-position: center center !important;
        text-align: center;
        box-sizing: border-box;
    }

    .left-sidebar .download-block a span {
        display: block;
        width: 100%;
        padding-left: 0 !important;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .left-sidebar .download-block a b {
        display: block;
        margin-top: 5px;
        overflow-wrap: anywhere;
    }

    .content {
        order: 2;
        width: 100%;
        background-size: 100% auto;
    }

    .right-sidebar.sidebar {
        order: 3;
    }

    .sidebar {
        width: 100%;
        padding-top: 0;
    }

    .sidebar .widget,
    .sidebar .panel,
    .download-block,
    .server {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .content-title,
    .content-page,
    .content .col-xs-12 {
        padding-left: 12px;
        padding-right: 12px;
    }

    .slider {
        width: calc(100vw - 44px);
        max-width: none;
        height: auto !important;
        min-height: 260px;
        margin-left: auto;
        margin-right: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .slider .slides {
        min-height: 260px;
    }

    .slider .slides .slide {
        width: calc(100vw - 44px);
        max-width: none;
        height: auto !important;
        min-height: 260px;
        background-size: cover;
    }

    .slider .slides .slide-info {
        height: auto !important;
        min-height: 260px;
        align-content: flex-start;
        align-items: flex-start;
        padding: 24px 18px 28px 18px;
    }

    .slider .slides .slide-info h2 {
        font-size: 20px;
        margin-bottom: 12px;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .slider .slides .slide-info .slide-text {
        width: 100%;
        max-height: none;
        margin-left: 0;
        margin-bottom: 14px;
        padding: 12px 14px;
        overflow: visible;
        box-sizing: border-box;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .slider .slides .slide-info .slide-text p {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .slider .slides .slide-info .slide-i {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    .slider .slides .slide-info .button,
    .slider .slides .slide-info .button-border {
        max-width: 100%;
        margin-top: 4px;
        margin-bottom: 2px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .content table,
    .content center > table,
    .content .table,
    .content .rankings-table,
    .content .general-table-ui,
    .content .myaccount-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content .table > thead,
    .content .table > tbody,
    .content .table > tfoot {
        min-width: 100%;
    }

    .rankings_menu {
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rankings_menu a {
        width: auto;
        min-width: 135px;
    }

    .content form .form-control,
    .content form input[type="text"],
    .content form input[type="password"],
    .content form input[type="email"],
    .content form input[type="number"],
    .content form select,
    .content form textarea {
        width: 100%;
    }

    .content form .btn,
    .content form button,
    .content form input[type="submit"] {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .cc-selector,
    .cc-selector > table,
    .cc-selector > table > tbody,
    .cc-selector > table > tbody > tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .cc-selector > table > tbody > tr {
        display: flex !important;
        flex-direction: column;
        gap: 14px;
    }

    .cc-selector > table > tbody > tr > td {
        display: block !important;
        width: 100% !important;
        max-width: 420px !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 14px !important;
        float: none !important;
        text-align: center;
        white-space: normal !important;
        background: rgba(0, 0, 0, 0.65);
        border: 1px solid rgba(255, 184, 74, 0.18);
        border-radius: 8px;
    }

    .cc-selector > br {
        display: none;
    }

    .cc-selector .drinkcard-cc {
        display: block !important;
        width: 150px !important;
        height: 150px !important;
        max-width: 100%;
        margin: 0 auto 10px auto;
        float: none !important;
    }

    .cc-selector .donation-method-label {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        line-height: 1.35;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .cc-selector .btn,
    .cc-selector button,
    .cc-selector input[type="submit"] {
        display: block;
        width: 100%;
        max-width: 260px;
        margin: 16px auto 0 auto;
    }

    .page-content,
    .donaciones-item,
    .donaciones-item .card-body,
    .don-grid,
    .don-card,
    .don-body {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .donaciones-item h3,
    .donaciones-item .miniranks,
    .don-title,
    .don-price,
    .don-meta,
    .don-body,
    .donaciones-item p,
    .donaciones-item li,
    .donaciones-item code {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .don-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .don-card {
        display: block;
    }

    .donaciones-item img {
        max-width: 100%;
        height: auto;
    }

    .bp-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .bp-actions {
        grid-template-columns: 1fr !important;
    }

    .bp-history {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767px) {
    .wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }

    .header {
        height: 170px;
    }

    .content .col-xs-12 {
        float: none;
        width: 100%;
        padding-left: 6px;
        padding-right: 6px;
    }

    .content-page {
        padding: 12px;
    }

    .slider {
        width: calc(100vw - 28px);
        height: auto !important;
        min-height: 280px;
    }

    .slider .slides {
        min-height: 280px;
    }

    .slider .slides .slide {
        width: calc(100vw - 28px);
        height: auto !important;
        min-height: 280px;
    }

    .slider .slides .slide-info {
        min-height: 280px;
        padding: 18px 14px 28px 14px;
    }

    .slider .slides .slide-info h2 {
        font-size: 18px;
    }

    .slider .slides .slide-info p,
    .slider .slides .slide-info .slide-text {
        font-size: 13px;
    }

    .slider .arrows,
    .slider .navigation {
        display: none;
    }

    .top-block .top-name {
        max-width: 150px;
    }

    .social-tiles {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .events li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .events li a {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile_item0,
    .profile_item1,
    .profile_item2,
    .profile_item3,
    .profile_item4,
    .profile_item5,
    .profile_item6,
    .profile_item7,
    .profile_item8,
    .profile_item9,
    .profile_item10,
    .profile_item11,
    .profile_item236,
    .profile_item237,
    .profile_item238 {
        max-width: 100%;
    }

    .content .table-responsive {
        margin-bottom: 12px;
    }

    .content .table th,
    .content .table td,
    .content table th,
    .content table td {
        white-space: nowrap;
    }

    .content .table td p,
    .content table td p {
        white-space: normal;
    }

    .cc-selector > table,
    .cc-selector > table > tbody,
    .cc-selector > table > tbody > tr,
    .cc-selector > table > tbody > tr > td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
    }

    .cc-selector > table > tbody > tr {
        display: flex !important;
        flex-direction: column;
    }

    .cc-selector .donation-method-label,
    .cc-selector .donation-method-label span {
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .don-grid {
        grid-template-columns: 1fr !important;
    }

    .don-thumb {
        height: 110px !important;
    }

    .bp-grid {
        grid-template-columns: 1fr !important;
    }

    .bp-card,
    .bp-panel,
    .bp-action {
        padding: 12px !important;
    }

    .bp-value {
        font-size: 18px !important;
    }

    .footer {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        height: 145px;
    }

    .logo {
        width: min(260px, 88vw);
    }

    .slider {
        width: calc(100vw - 24px);
        height: auto !important;
        min-height: 300px;
    }

    .slider .slides {
        min-height: 300px;
    }

    .slider .slides .slide {
        width: calc(100vw - 24px);
        height: auto !important;
        min-height: 300px;
    }

    .slider .slides .slide-info h2 {
        font-size: 16px;
    }

    .slider .slides .slide-info .slide-i {
        display: block;
    }

    .slider .slides .slide-info .slide-i .button,
    .slider .slides .slide-info .slide-i .button-border {
        display: inline-block;
        width: auto;
        max-width: 100%;
        margin-top: 10px;
        margin-bottom: 8px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .button,
    .button-border,
    .btn {
        max-width: 100%;
    }

    .cc-selector .drinkcard-cc,
    .drinkcard-cc {
        width: 130px !important;
        height: 130px !important;
    }

    .cc-selector > table > tbody > tr > td {
        padding: 12px !important;
    }

    .donaciones-item .card-body {
        padding: 12px !important;
    }

    .content .panel,
    .content .well,
    .content .alert {
        word-wrap: break-word;
    }
}
