/* --- Admin & General Styles --- */
.ptt-start-button {
    background-color: #4CAF50 !important; /* Green */
    border-color: #4CAF50 !important;
    color: white !important;
}

.ptt-stop-button {
    background-color: #f44336 !important; /* Red */
    border-color: #f44336 !important;
    color: white !important;
}

#ptt-timer-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

#ptt-timer-controls button {
    width: 100%;
    text-align: center;
    justify-content: center;
}

#ptt-active-task-timer .colon,
.ptt-session-elapsed-time .colon {
    animation: ptt-blink 1s step-end infinite;
}

@keyframes ptt-blink {
  50% {
    opacity: 0;
  }
}

/* Spinner for AJAX actions */
.ptt-ajax-spinner {
    display: none;
    background: url('/wp-admin/images/spinner.gif') no-repeat;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 10px;
}

.ptt-ajax-message {
    font-size: 14px;
    padding: 5px 0;
    color: #444;
}

.ptt-ajax-message.success {
    color: #2b8a3e;
}
.ptt-ajax-message.error {
    color: #d94848;
}

/* --- Session Timer Styles --- */
.ptt-session-controls {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptt-session-active-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ptt-session-elapsed-time {
    font-family: monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #f44336; /* Red for running timer */
    background: #fdf2f2;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #fde0e0;
}

.ptt-session-elapsed-time .colon {
    position: relative;
    top: -1px;
}

.ptt-session-message {
    font-style: italic;
    color: #555;
}


/* --- Frontend Shortcode Styles --- */
.ptt-frontend-container {
    max-width: 600px;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 14px;
}

.ptt-frontend-container .ptt-form-field {
    margin-bottom: 15px;
}

.ptt-frontend-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ptt-frontend-container input[type="text"],
.ptt-frontend-container textarea,
.ptt-frontend-container select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

#ptt-active-task-display {
    border: 2px dashed #4CAF50;
    padding: 15px;
    margin-bottom: 20px;
    background: #e8f5e9;
}
#ptt-active-task-display h3 {
    margin-top: 0;
}

.ptt-task-budget {
    color: #f44336; /* Red */
    font-weight: bold;
    padding: 10px;
    background-color: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Error recovery styles */
.ptt-error-recovery {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    color: #856404;
}

.ptt-error-recovery a {
    color: #533f03;
    text-decoration: underline;
}

#ptt-frontend-force-stop-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

#ptt-frontend-force-stop-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Locked button state */
.ptt-stop-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Active timer display */
#ptt-active-task-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
    font-family: monospace;
}

/* --- Report Styles --- */
.ptt-report-results {
    font-size: 14px;
}
.ptt-report-results .client-group {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    background: #fff;
}
.ptt-report-results .project-group {
    margin-bottom: 20px;
    padding-left: 20px;
}

/* Table column widths */
.ptt-report-results table th:nth-child(1), /* Task Name */
.ptt-report-results table td:nth-child(1) {
    width: 30%;
}

.ptt-report-results table th:nth-child(2), /* Date */
.ptt-report-results table td:nth-child(2) {
    width: 10%;
}

.ptt-report-results table th:nth-child(3), /* Duration */
.ptt-report-results table td:nth-child(3) {
    width: 10%;
}

.ptt-report-results table th:nth-child(4), /* Orig. Budget */
.ptt-report-results table td:nth-child(4) {
    width: 10%;
}

/* Notes column styling */
.ptt-report-results table th:nth-child(5),
.ptt-report-results table td:nth-child(5) {
    width: 30%;
}

/* Status column styling */
.ptt-report-results table th:nth-child(6),
.ptt-report-results table td:nth-child(6) {
    width: 10%;
}

.ptt-report-results table td:nth-child(5) {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

.ptt-report-results table td:nth-child(5) a {
    color: #0073aa;
    text-decoration: none;
    word-break: break-all;
}

.ptt-report-results table td:nth-child(5) a:hover {
    color: #00a0d2;
    text-decoration: underline;
}

/* Budget column styling */
.ptt-report-results table td:nth-child(4) {
    font-weight: 600;
    color: #0073aa;
}

.ptt-report-results h4 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}

.ptt-report-results h5 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    font-size: 14px;
}

.subtotal {
    font-weight: normal;
    font-size: 14px;
    color: #666;
}

.grand-total {
    margin-top: 20px;
    padding: 15px;
    background: #333;
    color: #fff;
    font-size: 14px;
    text-align: right;
}

/* --- Self Test Styles --- */
#ptt-test-results-container {
    font-size: 14px;
}
#ptt-test-results-container table {
    width: 100%;
    margin-top: 1em;
}

#ptt-test-results-container .status-pass {
    color: green;
    font-weight: bold;
}

#ptt-test-results-container .status-fail {
    color: red;
    font-weight: bold;
}

/* --- Report View Mode Toggle Switch --- */
.ptt-toggle-control {
    display: inline-flex;
    background-color: #e0e0e0;
    border-radius: 15px;
    padding: 2px;
    border: 1px solid #c9c9c9;
}

.ptt-toggle-control input[type="radio"] {
    display: none;
}

.ptt-toggle-control label {
    margin-bottom: 0;
    padding: 4px 12px;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    border-radius: 13px;
    transition: all 0.2s ease-in-out;
    color: #50575e;
    font-weight: 400;
}

.ptt-toggle-control input[type="radio"]:checked + label {
    background-color: #fff;
    color: #1d2327;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}