/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* General Body and Layout Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

.container {
    max-width: 1000px;
}

/* Modal and Message Box Styles */
.message-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}


/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
}

tr:hover {
    background-color: #f3f4f6;
}

.nested-table {
    width: 100%;
    margin-top: 0.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.nested-table th {
    background-color: #f1f5f9;
    font-size: 0.8rem;
}

.nested-table td {
    font-size: 0.85rem;
}


/* Form Element Styles */
input[type="text"],
input[type="number"],
select,
textarea {
    @apply w-full p-1 border border-gray-300 rounded-md text-sm;
}

input:disabled,
select:disabled,
textarea:disabled {
    @apply bg-gray-100 cursor-not-allowed;
}

/* Number input spinners removal */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}


/* Specific Component Styles */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.status-green { background-color: #22c55e; }
.status-yellow { background-color: #facc15; }
.status-red { background-color: #ef4444; }
.status-gray { background-color: #9ca3af; }

.blinking {
    animation: blinker 1s linear infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}

.details-row > td {
    padding: 1rem;
    background-color: #fafafa;
    border-top: 2px solid #e5e7eb;
}

.toggle-btn {
    cursor: pointer;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
    transition: background-color 0.2s;
}
.toggle-btn:hover {
    background-color: #d1d5db;
}

.user-selected {
    color: #16a34a;
    font-weight: 600;
}

/* survevalu.html specific styles */
.survevalu-td { @apply p-1; }
.header-field { @apply flex items-center gap-2; }
.header-field label { @apply font-semibold whitespace-nowrap text-sm; }
.section-title { @apply bg-blue-800 text-white text-center font-bold p-2 rounded-t-md; }
.ok-nok-label { @apply flex items-center justify-center; }
.ok-nok-label input { @apply h-5 w-5; }
.ok-nok-status { @apply inline-block w-full text-center font-bold text-white rounded-md py-1; }
.status-ok { @apply bg-green-500; }
.status-nok { @apply bg-red-500; }

/* Navigatsiooniriba lingid */
.nav-link {
    @apply px-4 py-2 text-sm font-medium text-gray-700 rounded-md hover:bg-gray-100 hover:text-blue-600 transition-colors;
}

/* ajalugu.html specific styles */
.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 24px;
    border-left: 2px solid #e5e7eb;
}
.timeline-item:last-child {
    border-left: 2px solid transparent;
}
.timeline-icon {
    position: absolute;
    left: -13px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid #9ca3af;
}