protected function inAtRuleState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_DOUBLEQUOTE) {
            $this->setState(self::IN_ATRULESTRING);
        } elseif ($char === self::CHAR_TERMINATOR) {
            $this->setState(self::RUNNING);
            $this->cleanBuffer();
        } elseif ($char === self::CHAR_OPENINGBRACE && (($buffer = implode('', $this->getBuffer())) && (strpos($buffer, '@media') !== false || strpos($buffer, '@supports') !== false))) {
            $this->setState(self::RUNNING);
            $this->cleanBuffer();
        } elseif ($char === self::CHAR_OPENINGBRACE) {
            $this->setState(self::IN_ATRULEBODY);
            $this->cleanBuffer();
            $this->bufferize($char);
        } else {
            $this->bufferize($char);
        }

        $this->output($char);
    }