/* Certify plugin base frontend CSS. This file is required for WordPress inline styles to work. */

:root {
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgb(59 130 246 / .5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --certify-primary: #7c9a88; /* Updated primary color */
    --certify-primary-light: #7c9a881a; /* 10% opacity */
    --certify-primary-border: #7c9a884d; /* 30% opacity */
    --certify-text: #1f2937;
    --certify-text-light: #6b7280;
    --certify-bg: #ffffff;
    --certify-surface: #f9fafb;
}

/* Minimalist search form styling */
.cf-search {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    line-height: inherit;
    font-feature-settings: "cv02","cv03","cv04","cv11";
    font-variant-numeric: normal;
    box-sizing: border-box;
    border-style: solid;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    width: 700px;
    margin: 30px auto 20px auto !important; /* Reduced margin */
    background-color: transparent !important; /* Remove background */
    border: none !important; /* Remove border */
    padding: 0 !important; /* Remove padding */
    opacity: 1;
    transform: none;
}

.cf-search form {
    display: inline-flex;
    width: 100%;
    gap: 0.75rem;
    align-items: center;
}

/* Input field styling */
.cf-field {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    display: inline-block !important;
    border: 2px solid var(--certify-primary) !important; /* Thicker border */
    margin-bottom: 0px !important;
    width: 90%;
    padding: 12px 15px !important; /* More padding */
    height: 50px; /* Slightly taller */
    border-radius: 8px !important; /* Square corners */
    background: var(--certify-bg);
    color: var(--certify-text);
    font-size: 18px !important; /* Larger font */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow */
}

.cf-field:focus {
    outline: none;
    border-color: var(--certify-primary);
    box-shadow: 0 0 0 3px var(--certify-primary-light);
}

/* Search button styling */
.cf-btn {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    display: inline-block;
    border: none;
    height: 50px !important; /* Match input height */
    width: 200px;
    background: #3b5344 !important; /* Dark green button */
    color: #fff !important;
    min-height: 50px;
    border-radius: 8px !important; /* Square corners */
    font-weight: 700; /* Bolder text */
    font-size: 18px !important; /* Larger font */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 25px !important; /* More padding */
    transition: background 0.3s ease;
}

.cf-btn:hover {
    background: #2a3a30 !important; /* Darker on hover */
}

.success {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    color: #065f46;
    background-color: #d1fae5;
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #a7f3d0;
    border-radius: 0.75rem;
    font-weight: 500;
}

.danger {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    color: #991b1b;
    background-color: #fee2e2;
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    font-weight: 500;
}

@media screen and ( max-width: 768px ){
    .cf-search{ width: 90%; }
}
@media screen and ( max-width: 480px ){
    .cf-search form { display: flex; flex-direction: column; }
    .cf-field, .cf-btn {
        display: block !important;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Table styling for search results */
.search-table {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    border-spacing: 0 !important;
    width: 100%; 
    max-width: 100%; 
    border: 2px solid var(--certify-primary) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(124, 154, 136, 0.2); 
    margin: 30px auto;
    table-layout: fixed; 
}

.search-table thead tr th {
    background-color: var(--certify-primary) !important; 
    color: #fff !important;
    text-transform: uppercase;
    text-align: center;
    padding: 15px 10px !important; 
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 16px;
}

.search-table tbody tr td {
    border-right: 1px solid var(--certify-primary-border);
    padding: 12px 10px !important;
    text-align: center;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: var(--certify-bg);
    font-size: 16px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.search-table tbody tr:nth-child(even) td {
    background: var(--certify-surface);
}

.br-0 { border-right: none !important }

/* Search result heading */
.rs-heading {
    text-align: center;
    color: #3b5344;
    font-weight: 700;
    font-size: 24px;
    margin: 30px 0 20px;
}

.cf-tick svg {
    vertical-align: middle; 
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 5px;
}
.cf-tick svg circle { fill: #7c9a88; }


/* PERBAIKAN: CSS untuk Tampilan Mobile (Handphone) */
@media screen and (max-width: 768px) {
    .search-table {
        border: none !important;
        box-shadow: none !important;
    }

    .search-table thead {
        /* Sembunyikan header tabel di mobile */
        display: none;
    }

    .search-table, .search-table tbody, .search-table tr, .search-table td {
        display: block;
        width: 100%;
    }

    .search-table tr {
        /* Setiap baris menjadi sebuah kartu */
        margin-bottom: 20px;
        border: 2px solid var(--certify-primary);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(124, 154, 136, 0.2);
    }

    .search-table td {
        /* Atur sel sebagai baris di dalam kartu */
        text-align: right; /* Data di kanan */
        padding-left: 50% !important; /* Beri ruang untuk label */
        position: relative;
        border-right: none !important;
        border-bottom: 1px solid var(--certify-primary-border);
    }
    
    .search-table td:last-child {
        border-bottom: none; /* Hapus border untuk item terakhir di kartu */
    }

    .search-table td::before {
        /* Membuat label dari atribut data-label */
        content: attr(data-label);
        position: absolute;
        left: 15px; /* Label di kiri */
        width: 45%;
        text-align: left;
        font-weight: 700;
        text-transform: uppercase;
        color: #3b5344;
    }
}