/*
Theme Name:Absens
Theme URI: https://example.com/ars-absens
Author: ARS Developer Team
Author URI: https://arsdeveloper.com
Description: Tema WordPress khusus untuk sistem manajemen absensi. Dirancang untuk kebutuhan pelacakan kehadiran dengan antarmuka intuitif dan fitur responsif.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ars-absensi
Tags: absensi, presensi, karyawan, manajemen, laporan
*/
:root{
    --m_width:1200px;
    --autopad: calc((100% - var(--m_width)) / 2);
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--autopad);
    background-image: url('assets/img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
}
.container::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.form_block {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.form_block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
}

.form_title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.form_title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

#attendance-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
}

.form-group select,
.form-group input[type="file"],
.form-group button {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.form-group select:focus,
.form-group input[type="file"]:focus,
.form-group button:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232c3e50' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    transition: background 0.3s;
}

.file-input-wrapper:hover::after {
    background: #2980b9;
}

.custom-file-input {
    background-color: #3498db;
    color: white;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    font-weight: 600;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.custom-file-input.valid {
    background-color: #2ecc71; /* hijau sukses */
    color: #fff;
}

#photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#get_location {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#get-location:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

#get_location i {
    font-size: 18px;
}

#location-status {
    display: block;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e0e6ed;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.location-active {
    background-color: #e3f2fd !important;
    border-color: #bbdefb !important;
    color: #1976d2 !important;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

#map {
    width: 100%;
    height: 300px;
    margin-top: 1rem;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    display: none;
}

.map-visible {
    display: block !important;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-note {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        background-attachment: scroll;
    }

    .form_block {
        padding: 20px 15px;
        margin: 20px auto;
        border-radius: 10px;
        max-width: 100%;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    }

    .form_title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group select,
    .form-group input[type="file"],
    .form-group button,
    .custom-file-input {
        font-size: 14px;
        padding: 12px;
    }

    .btn-primary {
        padding: 14px;
        font-size: 15px;
    }

    #map {
        height: 250px;
    }

    .custom-file-input {
        font-size: 14px;
        padding: 12px;
    }

    .form-note {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container{
        padding: 20px 35px;
    }
    .form_title {
        font-size: 20px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 12px;
    }

    .form_block {
        padding: 15px 10px;
    }
}



.wrap {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    font-family: 'Segoe UI', sans-serif;
}

.wrap h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

th {
    background-color: #f7f7f7;
    color: #555;
    font-weight: 600;
}

tr:hover {
    background-color: #fafafa;
}

img {
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
    }

    td {
        padding: 10px;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 6px;
        color: #888;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}