#rfc-clock-builder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    overflow: visible;
}

.rfc-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    overflow: visible;
}

.rfc-controls {
    flex: 1;
    min-width: 300px;
}

.rfc-clock-display {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 20px !important;
    max-height: 100vh;
    z-index: 10;
}

#rfc-clock-svg {
    max-width: 100%;
    height: auto;
}

.rfc-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rfc-form-group {
    margin-bottom: 15px;
}

.rfc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.rfc-form-group select,
.rfc-form-group input[type="number"],
.rfc-form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rfc-button-small {
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.rfc-button-small:hover {
    background: #444;
}

.rfc-button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.rfc-button:hover {
    background: #135e96;
}

.rfc-button-secondary {
    background: #666;
}

.rfc-button-secondary:hover {
    background: #444;
}

.rfc-button-primary {
    background: #00a32a;
}

.rfc-button-primary:hover {
    background: #008a24;
}

.rfc-info {
    background: #e7f5ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2271b1;
}

.rfc-info p {
    margin: 5px 0;
    color: #333;
}

.rfc-element-list {
    margin-bottom: 20px;
}

.rfc-element-list h4 {
    margin-bottom: 10px;
    color: #333;
}

#rfc-elements-container {
    min-height: 150px;
    height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: white;
    resize: vertical;
}

.rfc-element-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: move;
}

.rfc-drag-handle {
    font-size: 18px;
    color: #999;
    cursor: grab;
    padding: 0 8px;
    user-select: none;
    line-height: 1;
}

.rfc-drag-handle:active {
    cursor: grabbing;
}

.rfc-element-item.ui-sortable-helper {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: #fff;
}

.rfc-element-item.ui-sortable-placeholder {
    background: #e0e0e0;
    border: 2px dashed #999;
    visibility: visible !important;
}

.rfc-element-info {
    flex: 1;
}

.rfc-element-info strong {
    color: #333;
}

.rfc-element-info small {
    color: #666;
}

.rfc-edit-duration {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

.rfc-edit-duration:hover {
    background: #e0e0e0;
    color: #000;
}

.rfc-duration-input {
    width: 50px;
    padding: 2px 4px;
    border: 1px solid #2271b1;
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
}

.rfc-duration-input:focus {
    outline: none;
    border-color: #135e96;
}

.rfc-element-actions {
    display: flex;
    gap: 5px;
}

.rfc-duplicate-item {
    background: #2271b1;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.rfc-duplicate-item:hover {
    background: #135e96;
}

.rfc-remove-item {
    background: #dc3232;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s;
}

.rfc-remove-item:hover {
    background: #a00;
}

.rfc-actions {
    display: flex;
    gap: 10px;
}

.rfc-actions button {
    flex: 1;
}

.rfc-wedge {
    cursor: pointer;
    transition: opacity 0.2s;
}

.rfc-wedge:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .rfc-container {
        flex-direction: column;
    }
    
    .rfc-actions {
        flex-direction: column;
    }
}