/**
 * Equipment CSS
 * Styles for the equipment pages
 */

/* Tooltip styles */
.tooltip3 {
    position: absolute;
    background-color: #BAB3B4;
    border: 1px solid #595959;
    padding: 0 0 2px 0;
    font-size: 13px;
    display: none;
    opacity: 0.87;
    z-index: 1000;
}

.tooltip3 .head {
    background-image: url(//cdn.klick-game.de/images/bg1.gif);
    text-align: center;
    color: #000000;
    font-weight: bold;
    padding: 2px;
}

.tooltip3 .content {
    padding: 8px;
    color: #000000;
}

/* Table styles */
.equipment-table {
    border: 0;
    width: 600px;
    margin: 0 auto;
    border-spacing: 1px;
    background-color: #BAB3B4;
}

.equipment-table td {
    border: 1px solid #726B6C;
    padding: 4px;
}

.equipment-table th {
    background-color: #726B6C;
    color: #FFFFFF;
    padding: 4px;
    text-align: left;
}

.equipment-table .section-header {
    background-color: #726B6C;
    color: #FFFFFF;
    font-weight: bold;
    padding: 4px;
    text-align: left;
}

/* Item hover effect */
.item-row {
    background-color: #726B6C;
    height: 22px;
}

.item-row:hover {
    background-color: #8A8384;
}

/* Form styles */
.item-form input[type="text"] {
    width: 100px;
    background-color: #BAB3B4;
    color: #000000;
    font-size: 12px;
    border: 1px solid #000000;
    padding-left: 3px;
    text-align: left;
}

.item-form input[type="text"]:focus {
    background-color: #D9D4D5;
}

.item-form select {
    width: 100px;
    background-color: #BAB3B4;
    color: #000000;
    font-size: 12px;
    border: 1px solid #000000;
    cursor: pointer;
}

.item-form select:focus {
    background-color: #D9D4D5;
}

/* Button styles */
.action-button {
    cursor: pointer;
    vertical-align: -2px;
}

input[type="button"] {
    background-color: #BAB3B4;
    color: #000000;
    border: solid 1px #000000;
    height: 22px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

input[type="button"]:hover {
    background-color: white;
    color: black;
}

input[type="button"]:disabled {
    cursor: default;
    opacity: 0.7;
}

.equipment-button {
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

/* Message styles */
.success-message {
    background-color: #132D3D;
    border: 1px solid #328727;
    padding: 5px;
    margin-bottom: 10px;
}

.error-message {
    background-color: #2A2636;
    border: 1px solid #CC520D;
    padding: 5px;
    margin-bottom: 10px;
}

/* Fix for broken HTML structure */
table {
    border-collapse: separate;
}

/* Fix for broken rows */
tr[bgcolor="#726B6C"] {
    background-color: #726B6C !important;
}

tr[bgcolor="#726B6C"]:hover {
    background-color: #8A8384 !important;
}

td[style*="border:  solid 1px rgb(114,107,108)"] {
    border: solid 1px #726B6C !important;
    padding: 4px !important;
}

/* Fix for broken onmouseout/onmouseover */
[onmouseout*="this.style.background"], [onmouseover*="this.style.background"] {
    transition: background-color 0.2s;
}

/* Fix for broken links */
a[href*="onmouseout"] {
    color: inherit;
    text-decoration: none;
}

a[href*="onmouseout"]:hover {
    text-decoration: underline;
}

/* Fix for broken onclick */
[onclick*="onmouseout"] {
    cursor: pointer;
}

/* Link styles */
.link7, .link9, .link13, .link18, .link3, .link4 {
    text-decoration: none;
}

.link7 {
    color: #fff;
}

.link9 {
    color: #000;
}

.link13 {
    color: #FF7400;
}

.link18 {
    color: #00FFFF;
}

.link3 {
    color: #00FF00;
}

.link4 {
    color: #fff;
}

.link7:hover, .link9:hover, .link13:hover, .link18:hover, .link3:hover, .link4:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 768px) {
    .equipment-table {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .item-form input[type="text"],
    .item-form select {
        width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.5rem;
    }

    input[type="button"] {
        width: 100%;
        height: auto;
        padding: 0.75rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .tooltip3 {
        max-width: 90vw;
        font-size: 0.875rem;
    }

    .tooltip3 .content {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .equipment-table {
        font-size: 0.875rem;
    }

    .equipment-table td,
    .equipment-table th {
        padding: 0.5rem;
    }

    .item-form input[type="text"],
    .item-form select {
        width: 100%;
        font-size: 14px;
        padding: 0.4rem;
    }

    input[type="button"] {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .tooltip3 {
        font-size: 0.75rem;
    }

    .tooltip3 .head {
        padding: 0.25rem;
    }

    .tooltip3 .content {
        padding: 0.4rem;
    }

    .success-message,
    .error-message {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 991px) {
    .equipment-table {
        width: 90%;
    }

    .item-form input[type="text"],
    .item-form select {
        width: 90px;
    }
}

/* Desktop hover effects */
@media (min-width: 992px) {
    .item-row:hover {
        transform: scale(1.01);
        transition: transform 0.2s, background-color 0.2s;
    }

    input[type="button"]:hover {
        transform: translateY(-1px);
    }

    .action-button:hover {
        transform: scale(1.1);
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    input[type="button"],
    .action-button,
    .equipment-button {
        min-height: 44px;
        min-width: 44px;
    }

    .item-form input[type="text"],
    .item-form select {
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .tooltip3,
    input[type="button"],
    .action-button {
        display: none !important;
    }

    .equipment-table {
        border: 1px solid #000;
    }

    .equipment-table td,
    .equipment-table th {
        border: 1px solid #000;
        color: #000;
    }

    body {
        background-color: #fff;
    }
}
