/* CalDAV Calendar Styles */

/* Disabled fields */
.disabled-field {
    opacity: 0.5;
}

/* Log container */
.cct-log-container {
    margin-top: 15px;
    max-width: 100%;
}

.cct-log-textarea {
    width: 100%;
    height: 300px;
    font-family: monospace;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}

.cct-log-actions {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.cct-log-actions button,
.cct-log-actions input[type="submit"] {
    margin-right: 10px;
}

/* Test connection result */
#cct-test-result {
    margin-top: 15px;
}

/* Clear log button */
.cct-clear-log {
    background-color: #dc3232;
    border-color: #dc3232;
    color: white !important;
}

.cct-clear-log:hover {
    background-color: #b32d2e !important;
    border-color: #b32d2e !important;
    color: white !important;
}

/* Cron interval toggle buttons */
.cron-interval-toggle {
    margin-top: 10px;
}

.cron-interval-toggle button {
    margin-right: 10px;
}

.cron-interval-option {
    margin-bottom: 10px;
}

.cron-interval-option label {
    display: inline-block;
    width: 80px;
    font-weight: bold;
}

/* Frontend Calendar Display Styles */
.caldav-calendar {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.caldav-calendar.caldav-error {
    background: #fff5f5;
    border-color: #ffebeb;
    color: #d63031;
}

.caldav-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
    color: #333;
}

.caldav-name {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-style: italic;
    color: #555;
}

.caldav-no-events {
    font-style: italic;
    color: #666;
}

.caldav-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.caldav-event {
    padding: 12px 0;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    flex-wrap: wrap;
}

.caldav-event:last-child {
    border-bottom: none;
}

.caldav-event-date {
    font-weight: bold;
    margin-right: 15px;
    min-width: 100px;
}

.caldav-event-time {
    color: #666;
    margin-right: 15px;
}

.caldav-event-summary {
    flex: 1;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: #333;
}

.caldav-event-location {
    flex-basis: 100%;
    margin-top: 5px;
    margin-left: 115px;
    font-size: 0.9em;
    color: #666;
}

.caldav-past-event {
    opacity: 0.7;
}

/* Compact display mode */
.caldav-compact .caldav-event {
    padding: 8px 0;
}

.caldav-compact .caldav-event-date,
.caldav-compact .caldav-event-time {
    font-size: 0.9em;
    min-width: 80px;
}

.caldav-compact .caldav-event-summary {
    font-size: 0.95em;
}
/* CalDAV Calendar Styles */

/* Disabled fields */
.disabled-field {
    opacity: 0.5;
}

/* Log container */
.cct-log-container {
    margin-top: 15px;
    max-width: 100%;
}

.cct-log-textarea {
    width: 100%;
    height: 300px;
    font-family: monospace;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}

.cct-log-actions {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.cct-log-actions button,
.cct-log-actions input[type="submit"] {
    margin-right: 10px;
}

/* Test connection result */
#cct-test-result {
    margin-top: 15px;
}

/* Clear log button */
.cct-clear-log {
    background-color: #dc3232;
    border-color: #dc3232;
    color: white !important;
}

.cct-clear-log:hover {
    background-color: #b32d2e !important;
    border-color: #b32d2e !important;
    color: white !important;
}

/* Cron interval toggle buttons */
.cron-interval-toggle {
    margin-top: 10px;
}

.cron-interval-toggle button {
    margin-right: 10px;
}

.cron-interval-option {
    margin-bottom: 10px;
}

.cron-interval-option label {
    display: inline-block;
    width: 80px;
    font-weight: bold;
}

/* Frontend Calendar Display Styles */
.caldav-calendar {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.caldav-calendar.caldav-error {
    background: #fff5f5;
    border-color: #ffebeb;
    color: #d63031;
}

.caldav-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
    color: #333;
}

.caldav-name {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-style: italic;
    color: #555;
}

.caldav-no-events {
    font-style: italic;
    color: #666;
}

.caldav-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.caldav-event {
    padding: 12px 0;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    flex-wrap: wrap;
}

.caldav-event:last-child {
    border-bottom: none;
}

.caldav-event-date {
    font-weight: bold;
    margin-right: 15px;
    min-width: 100px;
}

.caldav-event-time {
    color: #666;
    margin-right: 15px;
}

.caldav-event-summary {
    flex: 1;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: #333;
}

.caldav-event-location {
    flex-basis: 100%;
    margin-top: 5px;
    margin-left: 115px;
    font-size: 0.9em;
    color: #666;
}

.caldav-past-event {
    opacity: 0.7;
}

/* Compact display mode */
.caldav-compact .caldav-event {
    padding: 8px 0;
}

.caldav-compact .caldav-event-date,
.caldav-compact .caldav-event-time {
    font-size: 0.9em;
    min-width: 80px;
}

.caldav-compact .caldav-event-summary {
    font-size: 0.95em;
}

/* Widget Styles */
.caldav-widget-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.caldav-widget-event {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.caldav-widget-event:last-child {
    border-bottom: none;
}

.caldav-widget-event-title {
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 5px;
    color: #333;
}

.caldav-widget-event-datetime {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.caldav-widget-event-date {
    font-weight: 500;
}

.caldav-widget-event-time {
    margin-left: 5px;
}

.caldav-widget-event-location {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
    font-style: italic;
}

.caldav-widget-event-description {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

.caldav-widget-error {
    color: #d63031;
    font-size: 0.9em;
    padding: 10px;
    background: #fff5f5;
    border: 1px solid #ffebeb;
    border-radius: 3px;
}

.caldav-widget-no-events {
    color: #666;
    font-style: italic;
    padding: 10px 0;
}

/* Calendar Grid Styles */
.caldav-calendar-grid {
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.caldav-calendar-header {
    margin-bottom: 10px;
}

.caldav-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.caldav-calendar-month-year {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    text-align: center;
}

.caldav-nav-prev,
.caldav-nav-next {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1.5em;
    line-height: 1;
    color: #666;
    transition: all 0.2s;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.caldav-nav-prev:hover,
.caldav-nav-next:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

.caldav-nav-prev:active,
.caldav-nav-next:active {
    background-color: #e0e0e0;
}

.caldav-calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.caldav-calendar-table thead th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.caldav-calendar-table tbody td {
    padding: 8px 4px;
    text-align: center;
    vertical-align: top;
    border: 1px solid #f0f0f0;
    min-height: 40px;
    position: relative;
}

.caldav-day {
    min-height: 40px;
    position: relative;
}

.caldav-day-empty {
    background-color: #fafafa;
}

.caldav-day-number {
    display: block;
    font-size: 0.9em;
    color: #333;
}

.caldav-day-has-events {
    background-color: #f0f7ff;
    cursor: pointer;
    position: relative;
}

.caldav-day-has-events:hover {
    background-color: #e0efff;
}

/* Event indicator - circular background like WordPress calendar */
.caldav-day-has-events .caldav-day-number {
    position: relative;
    z-index: 1;
}

.caldav-day-has-events::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #0073aa;
    z-index: 0;
    opacity: 0.2;
}

.caldav-day-has-events:hover::before {
    opacity: 0.3;
}

.caldav-day-today {
    background-color: #fff9e6;
    font-weight: 600;
}

.caldav-day-today.caldav-day-has-events {
    background-color: #e6f3ff;
}

.caldav-day-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    padding: 4px;
    border-radius: 3px;
}

.caldav-day-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.caldav-event-indicator {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
}

.caldav-event-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #0073aa;
}

/* Calendar Help */
.caldav-calendar-help {
    position: relative;
    margin-bottom: 10px;
    text-align: right;
}

.caldav-help-icon {
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.caldav-help-icon:hover {
    opacity: 1;
}

.caldav-help-popup {
    position: absolute;
    top: 25px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 250px;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Events List Below Calendar */
.caldav-events-list {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.caldav-events-list h4 {
    font-size: 1em;
    margin: 0 0 10px 0;
    color: #333;
}

.caldav-events-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.caldav-event-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid #0073aa;
    padding-left: 10px;
}

.caldav-event-item:last-child {
    border-bottom: none;
}

.caldav-event-date {
    font-weight: 600;
    color: #666;
    margin-right: 10px;
    font-size: 0.9em;
}

.caldav-event-title {
    font-weight: 500;
    color: #333;
    margin-right: 10px;
}

.caldav-event-time {
    color: #999;
    font-size: 0.85em;
    margin-right: 10px;
}

.caldav-event-location {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

.caldav-no-events {
    color: #666;
    font-style: italic;
    padding: 10px 0;
}

/* Calendar Themes */
.caldav-theme-minimal .caldav-calendar-table {
    border: none;
}

.caldav-theme-minimal .caldav-calendar-table thead th {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 400;
}

.caldav-theme-minimal .caldav-calendar-table tbody td {
    border: none;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.caldav-theme-minimal .caldav-day-has-events {
    background-color: transparent;
}

.caldav-theme-minimal .caldav-day-has-events .caldav-day-number {
    font-weight: 600;
}

.caldav-theme-colorful .caldav-calendar-table thead th {
    background-color: #f5f5f5;
    color: #333;
}

.caldav-theme-colorful .caldav-day-has-events {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.caldav-theme-colorful .caldav-day-today {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
}

.caldav-theme-colorful .caldav-day-today.caldav-day-has-events {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
}