/* =========================
   TABLE STRUCTURE
========================= */

.waypoints-list {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

.waypoints-list th,
.waypoints-list td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
}

.waypoints-list th {
    background: #f4f4f4;
    font-weight: bold;
}

/* Sort arrows */
.waypoints-list th.sort-asc:after {
    content: " ▲";
    font-size: 11px;
}

.waypoints-list th.sort-desc:after {
    content: " ▼";
    font-size: 11px;
}

/* =========================
   COLUMN WIDTHS
========================= */

.waypoints-list th:nth-child(1),
.waypoints-list td:nth-child(1) { width: 16%; }

.waypoints-list th:nth-child(2),
.waypoints-list td:nth-child(2) { width: 8%; text-align:center; }

.waypoints-list th:nth-child(3),
.waypoints-list td:nth-child(3) { width: 12%; }

.waypoints-list th:nth-child(4),
.waypoints-list td:nth-child(4) { width: 12%; }

.waypoints-list th:nth-child(5),
.waypoints-list td:nth-child(5) { width: 20%; font-size:13px; }

.waypoints-list th:nth-child(6),
.waypoints-list td:nth-child(6) { width: 18%; }

.waypoints-list th:nth-child(7),
.waypoints-list td:nth-child(7) { width: 14%; }

/* =========================
   THUMBNAIL MAP
========================= */

.preview-map {
    width: 100%;
    height: 180px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* =========================
   SEARCH FIELD
========================= */

.waypoints-search {
    width: 100%;
    max-width: 320px;
    padding: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* =========================
   ACTION BUTTONS
========================= */

.action-btn {
    display: block;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 6px;
    padding: 8px 10px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
}

.edit-btn {
    background-color: #555555;
}

.map-btn {
    background-color: #28a745;
}

.action-btn:hover {
    opacity: 0.9;
}

/* =========================
   MODAL OVERLAY
========================= */

#waypoint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
}

#waypoint-modal.active {
    display: block;
}

/* Popup container */
#waypoint-modal-content {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;

    /* Visual treatment */
    border: 4px solid #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Map fills container */
#waypoint-modal-map {
    width: 100%;
    height: 100%;
}

/* Close button */
#waypoint-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 22px;
    background: #ffffff;
    cursor: pointer;
    color: #333333;
    z-index: 1000001;
}

/* =========================
   SUBTITLE
========================= */

.waypoint-subtitle {
    text-align: center;
    margin-bottom: 15px;
}