/**
 * WebEngine CMS
 * MU HUAYRA
 * @version 1.0
 * @author Leonardo Soto
 * @copyright (c) 2026 Leonardo Soto, All Rights Reserved
 */

/* =========================================================
   CONTENEDOR PRINCIPAL
   ========================================================= */

.castle-siege-block {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.castle-siege-block .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}


/* =========================================================
   DUEÑO DEL CASTILLO
   ========================================================= */

.castle-siege-block .castle-owner-panel {

    width: 100%;

    background: #161616;

    color: #ffffff;

    border: 1px solid #b88a43;

    border-radius: 8px;

    padding: 16px 18px;

    margin: 0 0 24px 0;

    box-shadow: 0 4px 14px rgba(0,0,0,.18);

    transition: .2s;
}

.castle-siege-block .castle-owner-panel:hover {

    border-color: #c9a15a;

    box-shadow: 0 5px 18px rgba(0,0,0,.22);
}


/* Contenedor */

.castle-owner-main {
    display: flex;
    align-items: center;
    min-height: 105px;
    width: 100%;
}


/* =========================================================
   LOGO
   ========================================================= */

.castle-owner-logo {
    width: 90px;
    min-width: 90px;

    padding-right: 18px;
    margin-right: 18px;

    border-right: 1px solid rgba(184,138,67,.30);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}


/* Evita que el logo rompa el tamaño */

.castle-owner-logo img {

    max-width: 75px;

    max-height: 75px;

    display: block;
}


/* =========================================================
   INFORMACION
   ========================================================= */

.castle-owner-info {

    min-width: 0;
}


/* Títulos pequeños */

.castle-owner-label {

    color: #c8a96b;

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: .7px;

    margin-bottom: 3px;
}


/* Nombre del clan */

.castle-owner-name,
.castle-owner-name a {

    display: block;

    color: #b71919 !important;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 27px;

    font-weight: bold;

    line-height: 30px;

    margin: 0 0 12px 0;
}


/* Guild Master */

.castle-owner-master,
.castle-owner-master a {

    color: #dddddd !important;

    font-size: 14px;

    line-height: 18px;
}

/* =========================================================
   ALIANZA
   ========================================================= */

.castle-alliance {
    padding-left: 10px;
}

.castle-alliance-title {
    color: #c8b27d;

    font-size: 13px;
    font-weight: bold;

    text-transform: uppercase;
    letter-spacing: 1px;

    margin-bottom: 15px;
}

.castle-alliance-item {
    display: flex;
    align-items: center;

    background: rgba(255,255,255,.03);

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 8px;

    padding: 12px;

    margin-bottom: 12px;

    transition: .2s;
}

.castle-alliance-item:hover {
    border-color: rgba(184,138,67,.45);

    background: rgba(255,255,255,.05);
}

.castle-alliance-logo {
    margin-right: 15px;
    padding-right: 15px;

    border-right: 1px solid rgba(184,138,67,.30);

    flex-shrink: 0;
}

.castle-alliance-info {
    min-width: 0;
}

.castle-alliance-name,
.castle-alliance-name a {
    color: #d6c7a2 !important;

    font-size: 18px;
    font-weight: bold;
}

.castle-alliance-master {
    color: #999;

    font-size: 12px;

    margin-top: 3px;
}

.castle-alliance-master a {
    color: #ffffff !important;
}


/* =========================================================
   BATALLA CASTLE SIEGE
   ========================================================= */

.castle-countdown {

    width: 100%;

    margin: 0 0 34px 0;

    padding: 12px 0;

    background: transparent;

    border: none;

    border-radius: 0;

    text-align: center;

    box-shadow: none;

}


/* Título */

.castle-countdown-title {

    position: relative;

    display: inline-block;

    padding: 0 22px;

    color: #c8a96b;

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1.8px;

    line-height: 20px;
}


/* Líneas laterales */

.castle-countdown-title:before,
.castle-countdown-title:after {

    content: "";

    position: absolute;

    top: 50%;

    width: 70px;

    height: 1px;

    background: #dddddd;
}


.castle-countdown-title:before {

    right: 100%;

}


.castle-countdown-title:after {

    left: 100%;

}


/* =========================================================
   CONTADOR
   ========================================================= */

.castle-siege-block #siegeTimer {

    margin-top: 8px;

    font-size: 42px;

    font-weight: bold;

    color: #b71919;

    text-align: center;

    letter-spacing: 1px;

    line-height: 48px;
}


.castle-siege-block #siegeTimer span {

    display: inline;

    margin-left: 4px;

    margin-right: 10px;

    font-size: 13px;

    color: #888;

    font-weight: normal;

    letter-spacing: 0;

    text-transform: lowercase;

    vertical-align: middle;
}

/* =========================================================
   TITULOS DE SECCION
   ========================================================= */

.castle-section-title-wrap {
    width: 100%;
    box-sizing: border-box;

    display: flex;

    align-items: center;

    margin: 30px 0 22px;
}

.castle-section-line {
    flex: 1;

    height: 1px;

    background: #dddddd;
}

.castle-section-line:last-child {
    background: #dddddd;
}

.castle-section-title {
    padding: 0 18px;
    color: #b71919;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}


/* =========================================================
   TARJETAS DE INFORMACION
   ========================================================= */

.castle-card {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e3e3e3;
    border-radius: 7px;

    padding: 16px;

    margin-bottom: 12px;

    min-height: 105px;

    transition: .2s;
}

.castle-card:hover {
    border-color: #b71919;

    box-shadow: 0 3px 12px rgba(0,0,0,.08);

    transform: translateY(-1px);
}

.castle-card-title {
    color: #b71919;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 13px;

    letter-spacing: .5px;

    font-weight: bold;

    margin-bottom: 12px;

    text-transform: uppercase;
}

.castle-card-value {
    color: #444444;

    font-size: 17px;

    font-weight: bold;

    line-height: 24px;
}

.castle-card-value-small {
    color: #888888;

    font-size: 12px;

    margin-top: 5px;
}

.castle-card-small {
    min-height: 90px;
}


/* =========================================================
   CLANES REGISTRADOS
   ========================================================= */

.castle-guild-card {
    width: 100%;
    box-sizing: border-box;

    display: flex;

    align-items: center;

    background: rgba(255,255,255,.03);

    border: 1px solid rgba(184,138,67,.18);

    border-radius: 8px;

    padding: 15px;

    margin-bottom: 18px;

    transition: .2s;
}

.castle-guild-card:hover {
    border-color: #b88a43;

    transform: translateY(-2px);

    box-shadow: 0 0 12px rgba(184,138,67,.15);
}

.castle-guild-logo {
    padding-right: 18px;

    margin-right: 18px;

    border-right: 1px solid rgba(184,138,67,.25);

    flex-shrink: 0;
}

.castle-guild-info {
    flex: 1;

    min-width: 0;
}

.castle-guild-name,
.castle-guild-name a {
    color: #d6c7a2 !important;

    font-size: 20px;

    font-weight: bold;

    margin-bottom: 14px;
}

.castle-guild-label {
    font-size: 11px;

    color: #c8b27d;

    text-transform: uppercase;

    font-weight: bold;
}

.castle-guild-value,
.castle-guild-value a {
    margin-top: 4px;

    color: #ffffff !important;
}


/* =========================================================
   CRONOLOGIA
   ========================================================= */

.castle-schedule-card {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e3e3e3;

    border-radius: 7px;

    padding: 15px 16px;

    margin-bottom: 12px;

    transition: .2s;
}

.castle-schedule-card:hover {
    border-color: #b71919;

    box-shadow: 0 3px 12px rgba(0,0,0,.07);
}

.castle-schedule-title {
    color: #b71919;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 12px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: .5px;

    margin-bottom: 8px;
}

.castle-schedule-value {
    color: #555555;

    font-size: 13px;

    font-weight: normal;

    line-height: 22px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:767px) {

    .castle-siege-block {
        width: 100% !important;
        max-width: 100% !important;
    }

    .castle-owner-main {
        align-items: flex-start;
    }

    .castle-owner-name,
    .castle-owner-name a {
        font-size: 24px;
    }

    .castle-alliance {
        padding-left: 0;

        margin-top: 20px;
    }

    .castle-section-title {
        font-size: 15px;

        padding: 0 10px;
    }

    .castle-siege-block #siegeTimer {
        font-size: 42px;

        line-height: 50px;
    }

    .castle-guild-card {
        align-items: flex-start;
    }

    .castle-guild-name,
    .castle-guild-name a {
        font-size: 18px;
    }

}

/* =========================================================
   DUEÑO DEL CASTILLO + CONTADOR
   ========================================================= */

.castle-siege-block .castle-owner-panel {

    width: 100%;
    box-sizing: border-box;

    background: #161616;

    color: #ffffff;

    border: 1px solid #b88a43;

    border-radius: 8px;

    padding: 18px 20px;

    margin: 0 0 24px 0;

    box-shadow: 0 4px 14px rgba(0,0,0,.18);

    transition: .2s;
}


.castle-siege-block .castle-owner-panel:hover {

    border-color: #c9a15a;

    box-shadow: 0 5px 18px rgba(0,0,0,.22);
}


/* =========================================================
   DISTRIBUCION
   ========================================================= */

.castle-owner-layout {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;
}


/* =========================================================
   INFORMACION DEL DUEÑO
   ========================================================= */

.castle-owner-main {

    display: flex;

    align-items: center;

    min-height: 105px;

    flex: 1;

    min-width: 0;
}


/* =========================================================
   LOGO
   ========================================================= */

.castle-owner-logo {

    width: 90px;

    padding-right: 18px;

    margin-right: 18px;

    border-right: 1px solid rgba(184,138,67,.30);

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}


.castle-owner-logo img {

    max-width: 75px;

    max-height: 75px;

    display: block;
}


/* =========================================================
   INFORMACION
   ========================================================= */

.castle-owner-info {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
}


/* Etiquetas */

.castle-owner-label {

    color: #c8a96b;
    white-space: nowrap;
    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: .7px;

    margin-bottom: 3px;
}


/* Nombre del clan */

.castle-owner-name,
.castle-owner-name a {

    display: block;

    color: #b71919 !important;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 27px;

    font-weight: bold;

    line-height: 30px;

    margin: 0 0 12px 0;
}


/* Guild Master */

.castle-owner-master,
.castle-owner-master a {

    color: #dddddd !important;

    font-size: 14px;

    line-height: 18px;
}


/* =========================================================
   CONTADOR DENTRO DE LA TARJETA
   ========================================================= */

.castle-owner-countdown {

    min-width: 260px;

    padding-left: 30px;

    margin-left: 30px;

    border-left: 1px solid rgba(184,138,67,.30);

    text-align: center;
}


/* Título */

.castle-owner-countdown .castle-countdown-title {

    color: #c8a96b;

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1.8px;

    line-height: 20px;

    margin-bottom: 6px;
}


/* =========================================================
   CONTADOR
   ========================================================= */

.castle-siege-block #siegeTimer {

    margin-top: 2px;

    font-size: 38px;

    font-weight: bold;

    color: #b71919;

    text-align: center;

    letter-spacing: 1px;

    line-height: 44px;

    min-height: 44px;
}


.castle-siege-block #siegeTimer span {

    display: inline;

    margin-left: 4px;

    margin-right: 8px;

    font-size: 12px;

    color: #999999;

    font-weight: normal;

    letter-spacing: 0;

    text-transform: lowercase;

    vertical-align: middle;
}

/* =========================================================
   TITULO BATALLA CASTLE SIEGE
   ========================================================= */

.castle-countdown {
    width: 100%;
    text-align: center;
    margin: 0 0 34px 0;
    padding: 10px 0;
}


.castle-countdown-title {
    position: relative;

    display: inline-block;

    padding: 0 22px;

    color: #c8a96b;

    font-size: 11px;

    font-weight: bold;

    text-transform: uppercase;

    letter-spacing: 1.8px;

    line-height: 20px;
}

/* =================================================
   CONTADOR CASTLE SIEGE
   ================================================= */

if($castleSiege->showBattleCountdown()) {

    echo '<div class="castle-owner-countdown">';

        echo '<div class="castle-owner-countdown-title">';
            echo 'BATALLA CASTLE SIEGE';
        echo '</div>';

        echo '<div id="siegeTimer"></div>';

    echo '</div>';

}